This is my code;
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>();
}
}
allStates = new Set<State>();
Set is an interface. So maybe you mean HashSet?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With