我收到标题中指定的错误消息。帮助
public class SumOfTwo {
public static void main(String args[]) {
int five = 5;
int four = 4;
int sum = five + four;
System.out.println(five " + " four);
}
}
答案 0 :(得分:1)
要将变量值与String
连接起来,它们之间需要+
。
更改
System.out.println(five " + " four);
到
System.out.println(five + " + " + four);