This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes Number of Threads Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Number of Threads" Watch "Number of Threads" New topic

Number of Threads


Joined: Nov 10, 2004
Posts: 6
In a java program such as "Hello World", how many Threads minimum works ?
What are those threads ?
Joel McNary

Joined: Aug 20, 2001
Posts: 1817

There is only 1 Thread (generally named "main") that handles a simple "Hello, World" program.

(Of course, the JVM may use different threads for its functions, but there is only the one Java thread).

Piscis Babelis est parvus, flavus, et hiridicus, et est probabiliter insolitissima raritas in toto mundo.

Joined: Nov 10, 2004
Posts: 6
Can i know what are the Threads JVM use for this and how they are used ?
I agree. Here's the link:
subject: Number of Threads
Similar Threads
Thread Question: Are they all "under" creator?
Thread Help Wanted
For those of you who are certified ......
thread safe for SecureRandom.nextBytes()?
To which of the following can we apply the synchronized keyword