hello world问题
答案:4 悬赏:50 手机版
解决时间 2021-04-04 04:45
- 提问者网友:锁深秋
- 2021-04-03 17:29
hello world问题
最佳答案
- 五星知识达人网友:舍身薄凉客
- 2021-04-03 18:59
public static void main(String args[]); <-这个地方,你把println写在main函数外面了,main函数是程序的唯一入口
改成
public static void main(String args[]){
System.out.println("helloworld");
}
===========================
public class HelloWorld{
public static void main(String [] args) {
System.out.println("Hello world!");
}
}
这是标准的HelloWorld,你试试看
改成
public static void main(String args[]){
System.out.println("helloworld");
}
===========================
public class HelloWorld{
public static void main(String [] args) {
System.out.println("Hello world!");
}
}
这是标准的HelloWorld,你试试看
全部回答
- 1楼网友:空山清雨
- 2021-04-03 21:34
从新安装
- 2楼网友:骨子里都是戏
- 2021-04-03 20:47
public class HelloWorld{
public static void main(String args[]){
System.out.println("hellworld!");
}
}
public static void main(String args[]){
System.out.println("hellworld!");
}
}
- 3楼网友:末日狂欢
- 2021-04-03 20:17
编译器没有出问题,是写代码的时候出现了问题
public static void main(String args[])后面应该是{ 而不是;这是主方法,应该用大括号括起来
public static void main(String args[])后面应该是{ 而不是;这是主方法,应该用大括号括起来
我要举报
如以上问答信息为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯