vscodemaven 配置_使用VSCode搭建简单Java开发环境(二、Maven环境)

Hi admin , I am trying use VSCode to bulid java project. And I tried use below codes:

public class Main{

public static void main(String[] args){

System.out.println("test");

}

}

And when i run, it gives me a error:

Exception in thread "main" java.lang.Error: Unresolved compilation problem:

at Main.main(main.java:2)

After that I tried use the cmd javac to compile the .java file, and it compile successfully, and run the class it turn out the test word.

I delete the public before the class in line 1 and it worked.

---------------------------------

I didn't know why, please tell me when you are free. Thanks for your time.

表情包
插入表情
评论将由博主筛选后显示,对所有人可见 | 还能输入1000个字符
相关推荐
©️2020 CSDN 皮肤主题: 游动-白 设计师:白松林 返回首页