public class HelloWorld{
public static void mian(String[] args){
int one = 10;
int two = 20;
int three = 0;
three = one + two;
System.out.println("three = two + 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 %= one ;
System.out.println("three %= one" + three );
}
}
D:\liujiahao>javac HelloWorld.java
D:\liujiahao>java HelloWorld
错误: 在类 HelloWorld 中找不到主方法, 请将主方法定义为:
public static void main(String[] args)
D:\liujiahao>java HelloWorld
错误: 在类 HelloWorld 中找不到主方法, 请将主方法定义为:
public static void main(String[] args)
chavin
相关分类