Java Multithreading, Concurrency, and Parallelism — Part 3

Life Cycle of a thread with Methods in Thread Class

For managing threads in java, we have many static and instance methods in the Thread class. We can use these methods for creating, starting, pausing, and stopping threads.

Static Methods

  1. static int activeCount()
  2. static Thread currentThread()
  3. static void dumpStack()
  4. static boolean interrupted()
  5. static void sleep()

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
KRISHNA KISHORE V

Full Stack Developer, Software Consultant, Technical Content Writer, Free Lancer