这是我的代码;
import java.util.*;
class State extends HashMap<Character, State>{
boolean isFinal;
State () {
isFinal = false;
}
}
class Automaton{
private Set<State> allStates;
private Set<State> finalStates;
private State initialState;
private State currentState;
private Set<Character> alphabet;
Automaton() {
allStates = new Set<State>();
}
}
答案 0 :(得分:9)
allStates = new Set<State>();
Set是一个界面。那么也许你的意思是HashSet?