import java.util.Scanner;
public class myClass {
public static void main(String[] args)
{
String[] exampleString;
char expression;
Scanner getExp = new Scanner(System.in);
while(expression = getExp.next().charAt(0))
{
// myString will added by expression character
}
}
}
我在Eclipse Mars上试过但是
expression = getExp.next().charAt(0) part gets error always.
我不明白错误是什么。
以前我想在这个链接上 stackoverflow Scanner question
我认为错了?答案 0 :(得分:2)
你可能想要
tempReportPath