Import a custom class in Java

If all of your classes are in the same package, you shouldn’t need to import them.

Simply instantiate the object like so:

CustomObject myObject = new CustomObject();

Leave a Comment