11

Java程序运行报错,提示"必须声明一个命名包",用的是eclipse的JavaSE-15,...

 3 years ago
source link: https://www.oschina.net/question/3898836_2322030
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Java程序运行报错,提示"必须声明一个命名包",用的是eclipse的JavaSE-15,不胜感激!

绿蔓青山 发布于 昨天 18:40

各位大侠好,新开始Java编程,第一个程序提示在开头和最后分别有入下提示:

Must declare a named package because this compilation unit is associated to the 
 named module 'DEmo_01'

Syntax error, insert "}" to complete ClassBody

能提示一下我怎么改吗,用的是eclipse的JavaSE-15,不胜感激!

public class HelloWorld {
    public static void main(String[] args){
        System.out.println("Hello World!");
}

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK