宋瑾
2021-05-28 16:21
public class HelloWorld{
public static void main(String[] args) {
int one = 10 ;
int two = 20 ;
int three = 0 ;
int one = 10;
int two = 20;
int three = 0;
three = one + two;
System.out.println("three = one + two ==>"+three);
three +=one;
System.out.println("three += one ==>"+three);
three -=one;
System.out.println("three -= one ==>"+three);
three *=one;
System.out.println("three *= one ==>"+three);
three /=one;
System.out.println("three /= one ==>"+three);
three %=one;
System.out.println("three %= one ==>"+three);
}
}
第7、8、9行前面已经不该有int,前面已经定义了。删除这三行,或者删除int即可。
Java入门第一季(IDEA工具)升级版
1165172 学习 · 17581 问题
相似问题