class ThrowsDemo
{
public static void main(String[] args) throws InterruptedException
{
doStuff();
}
static void doStuff() throws InterruptedException
{
doMoreStuff();
}
static void doMoreStuff() throws InterruptedException
{
System.out.println("Hi!");
Thread.sleep(5000);
System.out.println("I am Fine!");
}
}
{
public static void main(String[] args) throws InterruptedException
{
doStuff();
}
static void doStuff() throws InterruptedException
{
doMoreStuff();
}
static void doMoreStuff() throws InterruptedException
{
System.out.println("Hi!");
Thread.sleep(5000);
System.out.println("I am Fine!");
}
}
No comments:
Post a Comment