0
if (charIte.next()=='{' || charIte.next()=='}'
|| charIte.next()=='[' || charIte.next()==']'
|| charIte.next()=='(' || charIte.next()==')'
|| charIte.next()=='*' || charIte.next()=='"'
|| charIte.next()=='/'){
}
程序返回:異常線程 「main」 java.util.NoSuchElementException中如果statem
Exception in thread "main" java.util.NoSuchElementException at line
|| charIte.next()=='(' || charIte.next()==')'
問題是什麼?
問題是你打電話'下一個()'太多次。你需要將它存儲在一個變量中。 – shmosel