Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
class Base {
private void fun() {
System.out.println("Base fun");
}
}
class Derived extends Base {
private void fun() {
//Mümkün değil.
System.out.println("Derived fun");
}
public static void main(String[] args) {
Base obj = new Derived();
obj.fun();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment