package data_structures;
import java.util.StringTokenizer;
public class ExpressionEvaluator implements Stack, Queue {
private String userInput;
public ExpressionEvaluator() {
Userinput = null;
}
Iterator<E> st = new StringTokenizer();
token = st.next();
while (st.hasMoreTokens()) {
問題已經發生在這一點上,所以我沒有繼續碼這有什麼問題會返回以下錯誤?
的錯誤:
data_structures/ExpressionEvaluator.java:10: illegal start of typejava
while (st.hasMoreTokens()) {
^
data_structures/ExpressionEvaluator.java:10: <identifier> expected
while (st.hasMoreTokens()) {
^
data_structures/ExpressionEvaluator.java:10: ';' expected
while (st.hasMoreTokens()) {
^
data_structures/ExpressionEvaluator.java:10: illegal start of type
while (st.hasMoreTokens()) {
^
data_structures/ExpressionEvaluator.java:10: <identifier> expected
while (st.hasMoreTokens()) {
^
data_structures/ExpressionEvaluator.java:10: ';' expected
while (st.hasMoreTokens()) {
'Userinput'!='userInput'。 –
[不要在代碼片段中留下不匹配的括號和括號!](http://xkcd.com/859/) –