Saturday, 14 May 2022

Advance Java -Slip13 Write a java program to display name of currently executing Thread in multithreading

Write a java program to display name of currently executing Thread in  multithreading

public class Slip13 {

    public static void main(String[] args) {

        Thread t = Thread.currentThread();

        System.out.println("Thread Name is : " + t.getName());

    }

}