Saturday, September 20, 2014

NonASy


public class NonASy {
public static void main(String[] argv) throws Exception {
       System.out.println("Main Method start");
       longRunningMethod("testing", new Object());
       otherMethod();
   }
 
   public static Integer longRunningMethod(String param1,Object parm2) throws InterruptedException{
       System.out.println("Long running method");
       Thread.sleep(5000);
       //long process
       return 1;
   }
 
   public static void otherMethod(){
       System.out.println("Other Method");
   }  

}

No comments:

Post a Comment