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 [2022/03/11 05:25] – [Πρόσβαση στα πεδία της γονικής κλάσης] 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 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; | ||
} | } |
java/super_operator.1646976324.txt.gz · Last modified: 2022/03/11 05:25 by gthanos