we have read that the overriding method can throw none or as many exception as the base class but this code does not give me error why???
import java.io.*;
public class base1{
private float f1;
public void base1() throws IOException{
System.out.println("hello from base");
}
public static void main(
String args[])
{
}
}
class child extends base{
public static void main(String args[])
{}
public void base1() throws IOException,NumberFormatException
{
System.out.println("hello child");
}
}