A package is used in Java to organize related classes into modular units. It helps avoid naming conflicts and supports access control by providing different levels of visibility for classes within and outside the package.
An import statement is used in Java to make classes or interfaces from other packages available within the current program file. It simplifies accessing external code by importing only what is needed.
Public access modifier allows unrestricted access to classes, methods, or variables both within and outside their package. Any code with access to such elements can use them freely.
Private access modifier restricts access to classes, methods, or variables only within the same class. They are not accessible from other classes, even within the same package.