Int [ ] [ ] scores = { { 1, 2, 3} , { 2, 4, 6}, { 3, 6, 9} };how many objects in heap after the above stmt ?

Showing Answers 1 - 5 of 5 Answers

Irene

  • Oct 20th, 2006
 

is it four?

  Was this answer useful?  Yes

iyappan

  • Nov 15th, 2006
 

1

  Was this answer useful?  Yes

Jules

  • Feb 3rd, 2007
 

1 object of type Array

  Was this answer useful?  Yes

venkatgonu12

  • Aug 23rd, 2007
 

two dimensional array object. but only one object will be created when you created new object created that memory stored only one object

  Was this answer useful?  Yes

satabdi_d

  • Jan 15th, 2008
 

The preceding code creates a total of four objects on the heap. First, an array

of int arrays is constructed (the object that will be assigned to the scores

reference variable). The scores array has a length of three, derived from the

number of items (comma-separated) between the outer curly braces. Each of the

three elements in the scores array is a reference variable to an int array, so the

three int arrays are constructed and assigned to the three elements in the

scores array.

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions