编译不过是哪里出现问题?仔细检查没检查出问题,求指教!
运行失败 HelloWorld.java:36: error: class, interface, or enum expected } ^ 1 error 是什么问题,编译不过?附加代码如下
运行失败 HelloWorld.java:36: error: class, interface, or enum expected } ^ 1 error 是什么问题,编译不过?附加代码如下
2018-02-27
最简单代码
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==>"+(one+two));
System.out.println("three+=one==>"+(three+=one));
System.out.println("three-=one==>"+(three-=one));
System.out.println("three*=one==>"+(three*=one));
System.out.println("three/=one==>"+(three/=one));
System.out.println("three%=one==>"+(three%=one));
}
}
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) ;
three %= one;
System.out.println(three) ;
你这样写应该就可以了
举报