Packages in Java MCQs

@T-Bone

This question paper focuses on the "Packages" of the Java programming. These Multiple Choice Questions (mcq) should be practiced to improve the Java programming skills required for various interviews (campus interview, walk-in interview, company interview), placement, entrance exam and other competitive examinations.

This question paper focuses on the "Packages" of the Java programming. These Multiple Choice Questions (mcq) should be practiced to improve the Java programming skills required for various interviews (campus interview, walk-in interview, company interview), placement, entrance exam and other competitive examinations.

Questions

1. Package in Java is a mechanism to encapsulate a ______________.

Mark the correct option

2. Which of these keywords is used to define packages in Java?

Mark the correct option

3. Package names and directory structure are closely related.

Mark the correct option

4. An _______________ statement can be used to access the classes and interface of a different package from the current package.

Mark the correct option

5. Which of the following packages is used to includes classes to create user interface like Button and Checkbox?

Mark the correct option

6. Which of the following packages is used to includes utility classes like Calendar, Collection, Date?

Mark the correct option

7. Which of this access specifies can be used for a class so that its members can be accessed by a different class in the same package?

Mark the correct option

8. Which of the following is the correct way of importing an entire package "pkg"?

Mark the correct option

9. Which of the following is false statement about package in java?

Mark the correct option

10. Packages that are inside another package are the _________

Mark the correct option

Index of Questions