page 1 out of 3
page 1 out of 3
Question 1
Question 2
class Test
{
public static void main(String args[])
{
try
{
System.out.print("Java is easy" + " " + 100 / 0);
}
catch(Exception e)
{
System.out.print("to learn");
}
}
}Question 3
Question 4
Question 5
Question 6
Question 7
class Main
{
public static void main(String args[])
{
try
{
int a, b;
b = 0;
a = 5 / b;
System.out.print("The");
}
catch(ArithmeticException e)
{
System.out.print("Inquisitive");
}
}
}Question 8
class Main
{
public static void main(String args[])
{
try
{
int a, b;
b = 0;
a = 5 / b;
System.out.print("The");
}
catch(ArithmeticException e)
{
System.out.print("Inquisitive");
}
finally{
System.out.print("Executed");
}
}
}Question 9
class Check extends Exception { }
public class Main {
public static void main(String args[]) {
try {
throw new Check();
}
catch(Check t) {
System.out.println("Exception Throwed");
}
finally {
System.out.println("inside finally ");
}
}
}Question 10
public class Test
{
public static void main(String[] args)
{
try
{
return;
}
finally
{
System.out.println( "inside finally" );
}
}
}page 1 out of 3
page 1 out of 3
Oops!!
To view the solution need to Login