Get Current Thread - Java Thread

Java examples for Thread:Thread Operation

Description

Get Current Thread

Demo Code


public class Main {
 
        public static void main(String[] args) {
                Thread currentThread = Thread.currentThread();
                System.out.println(currentThread);
               //from w  ww . j a  v a 2 s .co  m
        }
}

Result


Related Tutorials