How many threads will be created for a java program, when it is compail & run? and what are they?

Plz give answer

Showing Answers 1 - 14 of 14 Answers

ayyappan

  • Oct 7th, 2005
 

 

 

   Two thread

   Main Thread

   subordinate Thread

 

 

  Was this answer useful?  Yes

Ramana

  • Oct 21st, 2005
 

Creation of thred wil depend upon your requirement i.e number of tasks to be run simultaneously as thread support multi tasking.For every java program atleast a thread will be used and that is main thread.

  Was this answer useful?  Yes

anshuman chhotaray

  • Oct 25th, 2005
 

There are atleast three thread created when we compile& run one program. first one is Main thread,second one which handels Garbage collector & third one is  , In programs that use the AWT, there's also a screen updater thread. Anshuman chhotray(orissa,india)

  Was this answer useful?  Yes

pavani

  • Nov 18th, 2005
 

Program threads are not created at compilation and at the time of execution of java program. Thread.activeCount() gives the no. of active threads.

  Was this answer useful?  Yes

Yasin

  • Jul 24th, 2007
 

Only one thread(Main thread) will be created. Below are the total threads running in JVM when run a java program.

1. Main Thread
2. Javadb Thread
3. Break Point Handler Threas
4. Finalize thread
5. Reference Handler
6. Signal Dispatcher
7. Step Handler Thread

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