Open Question
How many objects in heap after the following statement? Thread [ ] threads = new Thread [ 5 ];
  (Time Left: 0 days 0 hours)
  asked by: mrhandsomeabit  on: Feb 14, 2009  
Answers ( 4 )

There is one object in the heap after you allocate the array to size 5.

  apostle   answered on:Feb 15, 2009  0 comments


only reference are created and no object is created in the heap

  reizomg   answered on:Feb 17, 2009  0 comments


One object is created of array. thread variable is refering to it

Created object is type array not type of Thread

  totalsolutions   answered on:Feb 19, 2009  0 comments


here only one object is created.it's store in heap area.
but there is 5 reference is created which is store in stack area.

  karenwangyanqi   answered on:Feb 21, 2009  0 comments

 
Answer this Question:  Maximum Lenght of Answer:10000

 

Hot Questions

Contact Us - IT-Interview