月伴星如昨
2018-12-03 00:01
public class HelloWorld{
public static void main(String[] args) {
int one = 10 ;
int two = 20 ;
int three = 0 ;
three=one+two;
System.out.println(three);
three+=one;
System.out.println(three);
three*=one;
System.out.println(three);
three/=one;
System.out.println(three);
three%=one;
System.out.println(three);
为什么这段代码没有闭合给它加了两个 } 反而不行了
是不是回车按多了,}}在最下面你看不到?
public class HelloWorld{
public static void main(String[] args) {
int one = 10 ;
int two = 20 ;
int three = 0 ;
three=one+two;
System.out.println(three);
three+=one;
System.out.println(three);
three*=one;
System.out.println(three);
three/=one;
System.out.println(three);
three%=one;
System.out.println(three);
}
}
最后两个这么加就好了
Java入门第一季(IDEA工具)升级版
1165565 学习 · 17587 问题
相似问题