Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript 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: 24217
38
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!