Код: Выделить всё
public class Card {
private String cardRankString;
private String cardColorString;
private int copiesOfCard;
public Card(String rank, String color, int copies) {
cardRankString = rank;
cardColorString = color;
copiesOfCard = copies;
}
public int getCopies(Card c) {
return c.copiesOfCard;
}
public int getCopies() {
return this.copiesOfCard;
}
}
Подробнее здесь: https://stackoverflow.com/questions/792 ... erobject-c
Мобильная версия