hi memati bas,
i think this example will clear your problem
class th1 extends Thread
{
int i=9;
public void run()
{
try
{
Thread.sleep(20);
}
catch (Exception e)
{
e.printStackTrace();
}
System.out.println("Thread is exititng");
}
public void disp()
{
System.out.println("Display method is called");
}
public static void main(
String[] args)
{
th1 o1=new th1();
o1.start();
System.out.println("First Time Called"+o1.isAlive());
try
{
Thread.sleep(5000);
}
catch (Exception e)
{
}
System.out.println("Second Time Called"+o1.isAlive());
o1.disp();
System.out.println("Hello World!");
}
}
here we are calling disp method on same object on which run mehod is called