Easy learning at your Fingertips

Learn coding in different programming languages through our tutorials. We go from simple concepts to more advanced, search below for a topic!

Used by 4k+ companies

Top Categories

See our top categories 

CSS Tutorials

Learn More

Javascript

Learn More

HTML Tutorials

Learn More

Java Tutorials

Learn More

Top tutorials

See our top tutorials 

Latest JS Tutorials

Latest CSS Tutorials

Latest KoTLIN Tutorials

Code Editor

Lorem ipsum dolor sit amet, consectetur adipiscing dolor sit amet, consectetur elit.

				
					public class Main {
    public static void main(String[] args) {
        System.out.println("The name of the current thread is: "+Thread.currentThread().getName());
        System.out.println("Now, changing the name of the thread using the setName() method...");
        Thread.currentThread().setName("Main-Thread");
        System.out.println("The name of the thread after changing its first name: "+ Thread.currentThread().getName());
    }
}
				
			
				
					public class Main {
    public static void main(String[] args) {
        System.out.println("The name of the current thread is: "+Thread.currentThread().getName());
        System.out.println("Now, changing the name of the thread using the setName() method...");
        Thread.currentThread().setName("Main-Thread");
        System.out.println("The name of the thread after changing its first name: "+ Thread.currentThread().getName());
    }
}