Java 29 - throws keyword
Sun Nov 26 2023 17:13:21 GMT+0000 (Coordinated Universal Time)
Saved by
@Java
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();
}
}
content_copyCOPY
Comments