Priority
Priority Of Thread Are As Follow Or You Can Say The Constant Of Thread Class...
1. public static int MIN_PRIORITY ==> 0
2. public static int NORM_PRIORITY ==> 5
3. public static int MAX_PRIORITY ==> 10
class Thread1 extends Thread
{
public void run()
{
for(int i=1; i<=5; i++)
{
try
{
System.out.println("Thread :"+i);
Sleep(1500);
}
catch(InterruptedException e)
{
System.out.println(e);
}
}
}
}