yes. The contents of an object are not considered when counting the number of objects.
Type: Posts; User: Norm
yes. The contents of an object are not considered when counting the number of objects.
All arrays have a .length whose value is determined by the number of slots in the array.
Add a println to print it out to see what its value is.
Yes.
Look at the loop where the output is generated. See that it uses the .length attribute to control how many times to loop.
If the program is calculating the two items, then the code must be called two times. Is there a loop that goes through an array?
Try debugging the code by adding some println statements that...
What does the program's comments and doc say about how it uses the contents of the array?
Does it say what elements are in the slots of the array? What is in the second element?
Just like...