class Y{
void process(){
System.out.println("In Y process()");
}
}
class I extends Y{
void process(){
System.out.println("In I process()");
}
public static void main(String[] args){
Y y = new I();
y.process();
}
}
this code is based on overriding in java .but I have a doubt regarding this problem.when we call the process method using y reference variable then is the method call resolved at runtime or is it resolved by the compiler?please help me out with this problem that whether the JVM reolves which process method is to be called or is it the compiler?give reason for your answer.