ecplise运行程序时候报错,不知道如何解决



```java


public class Println {
    int a=1;
    double b=3;
//    System.out.println("不是变量不是方法");//这里不能成功运行
    public void haha() {
        System.out.print("123");
    }
}
//这里也不行,因为在方法体的外面

Error occurred during initialization of boot layer
java.lang.module.FindException: Error reading module: D:\Java\Three_fifteen1\src\Print\bin
Caused by: java.lang.module.InvalidModuleDescriptorException: Println.class found in top-level directory (unnamed package not allowed in module)
不知道怎么解决

先建包,这里报错是未命名的包名不被允许,建包之后把这个类放进去,然后写main方法执行

小姑娘,代码要写在main方法里面呢.哈哈哈
main方法是类的入口

写一个main方法,把第9行写到main方法中