Preview:
class A 

{ 

void m1()throws InterruptedException 

{ 

for(int i=0;i<5;i++) 

{ 

Thread.sleep(1000); 

System.out.println("Good Morning"); 

} 

} 

void m2()throws InterruptedException 

{ 

m1(); 

} 

public static void main(String args[])throws InterruptedException 

{ 

A x=new A(); 

x.m2(); 

} 

}
downloadDownload PNG downloadDownload JPEG downloadDownload SVG

Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!

Click to optimize width for Twitter