class CurrentThDetails{
public static void main(String ar[]){
Thread current=Thread.currentThread();
//displays information
System.out.println("Current Thread Details : "+current);
current.setName("Demo Thread");
System.out.println("After changing the names : "+current);
}
}
No comments:
Post a Comment