0
What is super method and super keyword??
is there any difference between super method and super keyword??
1 Antwort
+ 3
Using super keyword you can access parent class members if they aren't private.
Access parent constructor:
MyClass(String s) {
super(s);
}
Access parent property:
public void setValue(String s) {
super.value = s;
}
Access parent method:
public void setValue(String s) {
super.setValue(s);
}