qq_小白_8
2015-05-19 22:34
public class HelloWorld{
public static void main(String[] args) {
int one = 10 ;
int two = 20 ;
int three = 0 ;
int three=one+two;
System.out.println("three=one+two==>"+three);
int three+=one;
System.out.println("three+=one==>"+three);
int three-=one;
System.out.println("three-=one==>"+three);
int three*=one;
System.out.println("three*=one==>"+three);
int three/=one;
System.out.println("three/=one==>"+three);
int
three%=one;
System.out.println("three%=one==>"+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=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);
}
}除了第一个three前要加int以外其他的three都不用加int,否则会造成重定义的错误
Java入门第一季(IDEA工具)
1168174 学习 · 18754 问题
相似问题