java:super_operator
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
java:super_operator [2021/03/05 19:13] – [Πρόσβαση στις μεθόδους της γονικής κλάσης] gthanos | java:super_operator [2025/03/21 07:05] (current) – [Πρόσβαση στις μεθόδους της γονικής κλάσης] gthanos | ||
---|---|---|---|
Line 94: | Line 94: | ||
int height; | int height; | ||
- | public | + | public |
width = initWidth; | width = initWidth; | ||
height = initHeight; | height = initHeight; | ||
Line 124: | Line 124: | ||
} | } | ||
| | ||
- | public int getPerimeter() { | + | public int area() { |
- | return | + | return |
} | } | ||
} | } | ||
Line 134: | Line 134: | ||
==== Πρόσβαση στα πεδία της γονικής κλάσης ==== | ==== Πρόσβαση στα πεδία της γονικής κλάσης ==== | ||
- | Επιπλέον, | + | Επιπλέον, |
- | < | + | < |
- | public int getPerimeter() { | + | public int area() { |
- | return | + | return |
} | } | ||
</ | </ | ||
- | < | + | < |
- | public int getPerimeter() { | + | public int area() { |
- | return | + | return |
+ | } | ||
+ | </ | ||
+ | <code java> | ||
+ | public int area() { | ||
+ | return | ||
} | } | ||
</ | </ |
java/super_operator.1614971614.txt.gz · Last modified: 2021/03/05 19:13 by gthanos