简体   繁体   中英

How can I organize a project with exercises in NetBeans?

I'm doing self-study with a book. It has a lot of different small exercises. I don't want to begin a new project everytime, so I want to keep them all in one place organized by chapters.

But I'm a complete beginner and having trouble even with that. Here's a picture of a mistake that pops up and you can kind of get an idea of what I'm trying to do:

在此处输入图片说明

"1p5" and "1p7" stand for exercises 1.5 and 1.7.

If you have an idea on how to organize that sort of thing better, help would be very appreciated.

Your problem from the image is that you forgot to add your call to System.out inside a method such as main :

class NewClass1p7 {
    public static void main(String... args) {
        System.out.println("...");
    }
}  

Your package organization seems fine and not related to the problem.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM