Package Flashcards
What is the purpose of packages in java?
A package is used to encapsulate a group of classes, interfaces, and sub-packages. Often is a hierarchical structure of storing information. Packages also provide access protection, and removing naming collisions.
What is java.lang package?
This package contains all the classes that are fundamental to the design of the Java Programming language. The most important class in this package is Object class.
What is the most important class in Java?
This is an open-ended question, but it is often considered that the Object class is the most important class in java as it is the root of all classes.
What is a static import in Java?
Normal import allows us to import classes from packages without using the package qualifier, Static import allows us to import static members from a class without using the class qualifier.