Я понятия не имею, что это значит. Eclipse не должен давать такой ответ. Вот мой код. Пожалуйста, помогите мне.Ошибка синтаксиса на токене «;», <expected
import java.util.ArrayList;
import java.util.List;
/**
* An immutable class to represent a snapshot of the state of a table.
*
*/
public class DetailedHoldemTable extends Table {
private static final long serialVersionUID = 1647960710321459407L; //Here is the error
(name = "player");
private final List<SeatedPlayer> players;
private final boolean playing;
private final TableConfiguration property;
private final Pots pots;
private final SeatedPlayer dealer;
private final List<Card> communityCards;
private final Round round;
public DetailedHoldemTable(TableId id, String name, List<SeatedPlayer> players,
boolean playing, TableConfiguration property, Pots pots, SeatedPlayer dealer, List<Card> communityCards, Round round) {
super(id,name);
this.players = players==null? new ArrayList<SeatedPlayer>():new ArrayList<SeatedPlayer>(players);
this.playing = playing;
this.property = property;
this.pots = pots;
this.dealer = dealer;
this.communityCards = communityCards==null? new ArrayList<Card>():new ArrayList<Card>(communityCards);
this.round = round;
}
public DetailedHoldemTable(TableId id, String name, List<SeatedPlayer> players,
boolean playing, TableConfiguration property) {
this(id,name, players, playing, property, null, null, null, null);
}
protected DetailedHoldemTable() {
this.players = null;
this.playing = false;
this.property = null;
this.pots = null;
this.dealer = null;
this.communityCards = null;
this.round = null;
}
/**
* Returns the list of players at this table.
*
* @return The list of players at this table.
*/
public List<SeatedPlayer> getPlayers() {
return players;
}
/**
* The number of players seated at this table.
*
* @return The number of players seated at this table.
*/
public int getNbPlayers() {
return players.size();
}
/**
* The playing status of this table.
*
* @return True if the players are playing, false otherwise.
*/
public boolean isPlaying() {
return playing;
}
/**
* Returns the game property of this table.
*
* @return The game property of this table.
*/
public TableConfiguration getTableConfiguration() {
return property;
}
public Pots getPots(){
return pots;
}
public SeatedPlayer getDealer(){
return dealer;
}
public List<Card> getCommunityCards(){
return communityCards;
}
public Round getRound() {
return round;
}
}
Ошибка на 5-й строке, где я определил serialVersionUID. Как я писал в названии, eclipse запрашивает символ < после запятой, но это не имеет никакого смысла, на мой взгляд. Сообщение, которое оно мне дает, такое же, как в заголовке
что '(имя = "игрок");' –
В принципе должен быть полем. Должен ли я определить его как «private String ..»? –
Вообще говоря, разумно не предполагать, что компилятор ошибается, и вы правы. Ошибки компилятора происходят, но они редки. – pamphlet