PROGRAM-
class ExceptionDem2
{
public
static void main(String args[ ])
{
System.out.println("In the Main
block");
try
{
System.out.println("In the try
block");
int a=10,b=0,c;
c=a/b;
System.out.println("Result="+c);
}
finally
{
System.out.println("In the finally
block");
}
}
}
Comments
Post a Comment