Java Package Vs Folder-Structure? what is the difference

If you configured stuffs correctly. Adding a folder inside src, is same as adding a package from File > New Package.

So, it’s up to you, whatever feels comfortable to you — add a folder or create a package. Also, when you put stuffs under src the package name starts from subfolder. So, src/com/naishe/test will be package com.naishe.test.

Leave a Comment