Package Flashcards

1
Q

What is the purpose of packages in java?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is java.lang package?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is the most important class in Java?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is a static import in Java?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly