class Threadex
{
public static void main(String args[])
{
Thread t=Thread.currentThread();
System.out.println("Current running thread is "+t);
t.setName("MainThread");
System.out.println("After changing name of the thread is "+t.getName());
try
{
t.sleep(10000);
}
catch(Exception e)
{
System.out.println("Error caught ! "+e);
}
System.out.println("main() is ending");
}
}
Nesta página do site você pode assistir ao vídeo on-line Thread in java | Main Thread in java| Primary Thread| Primary Thread in java | Java code for Thread duração hora minuto segundo em boa qualidade , que foi baixado pelo usuário Praveen Srivastava 29 Setembro 2020, compartilhe o link com seus amigos e conhecidos, no youtube este vídeo já foi visto 157 vezes e gostou 21 espectadores. Boa visualização!