help!
please concider the followwing code:
Code:
Customer c; //c will refer to a customer
c = new Customer(); //c refers to a newly created customer
simmilarly:
Code:
int[] myarray;
myarray = new int[10];
the first excerpt is from my csc textbook. the second performs a simmmilar operation.
i sort of get that these both "create" a new object(?, pointer?, instance?) of whatever you are trying to initialize(?). but (as you might have guessed) im still a little fuzzy on understanding it all completely.
could anyone tell me
A)what exaclty is this doing
and B) what is the difference between what the first line does and the second line does.
thanks for the help.