How many objects in heap after the following statement? Thread [ ] threads = new Thread [ 5 ];

Showing Answers 1 - 4 of 4 Answers

Junior

  • Oct 3rd, 2006
 

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

  Was this answer useful?  Yes

bihag

  • Mar 17th, 2007
 

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

Created object is type array not type of Thread

  Was this answer useful?  Yes

meher.jogeswar

  • Oct 18th, 2007
 

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.

  Was this answer useful?  Yes

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