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