Ask Question

Name:
Title:
Your Question:

Answer Question

Name:
Your Answer:
User Submitted Source Code!


Description:
  HelloWorld.java
Language: JAVA
Code:
public class HelloWorld{

     public static void main(String []args){
        System.out.println("Hello World");
        One one = new One();
        Thread t = new Thread(one);
        t.start();
     }
     
}
class One implements Runnable{
         public void run(){
             try
             {                 
                 System.out.println("One............");
                 Thread.sleep(6000);
                 System.out.println("One End.............");          
            } 
             catch (InterruptedException iex) 
             {                 
                 System.out.println("Exception in thread: "+iex.getMessage());             
             } 
                    
         }
     }     
Comments: