What is super method and super keyword?? | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
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 Resposta
+ 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