Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Thread Array  RSS feed

 
Ninja Proctor
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Please answer this....



Thread []t=new Thread[4];

What does this do actually�
 
Ernest Friedman-Hill
author and iconoclast
Sheriff
Posts: 24215
37
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Welcome to JavaRanch!

This statement creates an array that can hold 4 references to Threads. They're all initialized to null. It doesn't create any actual Thread objects, just references to them.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!