This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision | Next revision Both sides next revision | ||
|
java:super_operator [2021/03/05 19:13] gthanos [Πρόσβαση στις μεθόδους της γονικής κλάσης] |
java:super_operator [2021/03/05 19:13] gthanos [Πρόσβαση στα πεδία της γονικής κλάσης] |
||
|---|---|---|---|
| Line 135: | Line 135: | ||
| Επιπλέον, | Επιπλέον, | ||
| - | < | + | < |
| public int getPerimeter() { | public int getPerimeter() { | ||
| return 2*(this.width+this.height); | return 2*(this.width+this.height); | ||
| } | } | ||
| </ | </ | ||
| - | < | + | < |
| public int getPerimeter() { | public int getPerimeter() { | ||
| return 2*(super.width+super.height); | return 2*(super.width+super.height); | ||