What will be the output of the following Java code?
class A
{
A()throws IOException
{
}
}
class B extends A
{
B()
{
}
public static void main(String[]args)
{
}
}
class A
{
A()throws IOException
{
}
}
class B extends A
{
B()
{
}
public static void main(String[]args)
{
}
}A. compile time error
B. run time error
C. compile and runs fine
D. unreported exception java.io.IOException in default constructor
Answer: Option A

Join The Discussion