Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //задаем вес коту
- ourcat.setWeight(5);
- //узнаем какой вес у кота
- int weight = ourcat.getWeight();
- System.out.print("Наш кот весит " + weight + " килограмм");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement