为了账号安全,请及时绑定邮箱和手机立即绑定

为什么可以编译却运行不了?

为什么可以编译却运行不了?

此生不变丶 2016-04-15 09:48:23
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.javaD:\liujiahao>java HelloWorld错误: 在类 HelloWorld 中找不到主方法, 请将主方法定义为:   public static void main(String[] args)D:\liujiahao>java HelloWorld错误: 在类 HelloWorld 中找不到主方法, 请将主方法定义为:   public static void main(String[] args)
查看完整描述

1 回答

已采纳
?
chavin

TA贡献46条经验 获得超7个赞

你的main方法  名字写错了

查看完整回答
1 反对 回复 2016-04-15
  • 1 回答
  • 0 关注
  • 1491 浏览

添加回答

举报

0/150
提交
取消
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号