Jabber, i have been waiting for ur reply from yesterday..i believe u can give a clearer expalination and u did..(i thought my question here is too dummy that u don't want to give any reply)..:-)

ely (Ely)
most of others can get the right answer but gave me different versions of explain that confused me even more. I think your explaination is to the point. it reminds me of an example i tried b4.
in this example, an object Day d works as Function argument:

static void changeDay(Day d, int yearsDelayed)
//won't work
{ int month = d.getMonth();
int day = d.getDay();
int year = d.getYear();}
d=new Day(year + yearsDelayed, month, day);

and suppose we call this function
ely = new Day(1999,10,15);

"ely" will not have the correct date i want because the function only did something on the "copy of the object" but not on the object itself, right?
2000-11-28 -04:00
This post has been archived. It cannot be replied.
Page address has been copied. To share, click to copy page address.
Share Online by QR Code

Back To Topic: What's the difference between "int a[] = new int[5]" and "int[] a = new int[5]"?

Back To Forum: HOME枫下论坛枫下论坛主坛工作学习IT技术讨论