What is considered an object in this question? There are 7 doubles in the array plus the array itself.
How many objects will be present after the following code fragment has executed?
double[] ann = new double[ 7 ];
double[] bob;
bob = ann;
2 7 14 1
only one object new double[ 7 ];
double[] bob; also references same object created in above step.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With