Question:medium

is a collection of classes and interfaces.

Show Hint

Think of packages as libraries or modules. The Java Development Kit (JDK) comes with a vast standard library organized into packages like `java.lang`, `java.io`, `java.net`, etc.
Updated On: Jul 2, 2026
  • Object
  • Collection
  • Package
  • Array
Show Solution

The Correct Option is C

Solution and Explanation

Step 1: Think of it like folders on a computer.
Just as a folder on a computer groups related files together so they stay organized and easy to find, Java needs a similar mechanism to group related classes and interfaces.
Step 2: Name that grouping mechanism.
This mechanism is called a package, and it works as a namespace that helps avoid naming conflicts between classes written by different programmers while also giving some control over access.
Step 3: Confirm it with a familiar example.
The commonly used java.util package, for instance, bundles together many utility classes such as ArrayList and HashMap, which is a direct illustration of a package being a collection of classes and interfaces.
\[ \boxed{\text{Package}} \]
Was this answer helpful?
0