This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
|
java:inheritance [2021/03/05 15:32] gthanos [Κληρονομικότητα] |
java:inheritance [2021/03/09 07:55] gthanos |
||
|---|---|---|---|
| Line 15: | Line 15: | ||
| int height; | int height; | ||
| - | public | + | public |
| width = initWidth; | width = initWidth; | ||
| height = initHeight; | height = initHeight; | ||
| Line 67: | Line 67: | ||
| void setY(int yPos) { | void setY(int yPos) { | ||
| y = yPos; | y = yPos; | ||
| + | } | ||
| + | | ||
| + | public String toString() { | ||
| + | return " | ||
| } | } | ||
| } | } | ||