JVM is a/an
Find the output:
class Animal
{
void showName( )
{
System.out.println("I am Animal");
}
}
class Dog extends Animal
{
void animalType( )
{
System.out.println("I am Dog");
}
}
public static void main(String args[])
{
Animal rusky= new Dog();
rusky.animalType();
}
When does Exceptions in Java arises in code sequence?
Which of these keywords must be used to monitor for exceptions?
What is the output of this program?
class exception_handling
{
public static void main(String args[])
{
try
{
System.out.print("Hello" + " " + 1 / 0);
}
catch(ArithmeticException e)
{
System.out.print("World");
}
}
}