I found this question interesting and thought of sharing with you all. I will post the answer later unless somebody post.
public class A{
private int f(){
return 2;
}
int g(){
return f();
}
public static void main(
String[] args){
System.out.println( new B().g());
}
}
class B extends A {
public int f(){
return 1;
}
}