Java Foundations — Question 53
What does import java.io* mean?
Answer options
- A. Only the io class is imported.
- B. All classes in the io package are imported.
- C. All classes whose names start with io are imported.
- D. All classes in the io package and the subpackages of io packages, if any, are imported.
Correct answer: B
Explanation
The statement import java.io* allows access to all classes within the io package, making option B the correct choice. Option A is incorrect because it implies only one class is imported, while option C suggests that only classes starting with 'io' are imported, which is not the case. Option D incorrectly states that subpackages are included, which is not true for this import syntax.