Does every Java class need a package?

You never need to put a class in a package . However, it is almost always a good idea. This is something that Netbeans aggressively tries to encourage you to do. For small projects, using the default package (that is, a file without a package statement) is OK.

Sizin İçin Seçtik  How do you return a name from a method in Java?

Leave a Reply

Your email address will not be published. Required fields are marked *