1.

What Is Thread In Java?

Answer»
  • Threads consumes CPU in BEST possible manner, HENCE enables multi processing. Multi threading reduces idle time of CPU which improves performance of application.
  • Thread are light weight process.
  • A thread class belongs to java.lang package.
  • We can create MULTIPLE threads in java, even if we don’t create any Thread, one Thread at LEAST do exist i.e. main thread.
  • Multiple threads run parallely in java.
  • Threads have their own stack.
  • ADVANTAGE of Thread : Suppose one thread needs 10 minutes to get certain task, 10 threads used at a time could complete that task in 1 minute, because threads can run parallely.



Discussion

No Comment Found