Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class thread1 extends Thread
- {
- public void run()
- {
- for(int i=0;i<=5;i++)
- {
- System.out.println("Status: "+isAlive());
- }
- System.out.println("Exit from Thread");
- }
- }
- class AliveJoinThread
- {
- public static void main(String args[])
- {
- thread1 t=new thread1();
- t.start();
- try
- {
- t.join();
- }
- catch(Exception e)
- {
- System.out.println("join method running");
- }
- System.out.println("New Status: "+t.isAlive());
- }
- }
Add Comment
Please, Sign In to add comment