0

What is super method and super keyword??

is there any difference between super method and super keyword??

1st Nov 2016, 2:35 AM
Mahesh Torgal
Mahesh Torgal - avatar
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); }
1st Nov 2016, 10:35 AM
Tamás Barta
Tamás Barta - avatar