Question 2 / 90:  Which statement represents a valid statement that will allow for the inclusion of classes from the java.util package?
A  import java.util;
B  import java.util.*;
C  #include java.util;
D  #include java.util.*;
<< First < Previous Flashcard Next > Last >>
Explanation:

B. To include all of the classes in the java.util package, the import statement is used, followed by the package name, including an asterisk.

A, C, and D are incorrect.

A is incorrect because the import statement must specify a class directly, or in this case all of the classes with the asterisk wildcard.

C is incorrect because of the exclusion of the asterisk wildcard, along with the use of an invalid #include keyword.

D is incorrect because of the invalid #include keyword, which is unique to the C and C++ programming languages.

Exam Home Page
https://www.jobilize.com/quiz-my-oca-mock-exam-by-mike-wolf

My OCA Mock

Author:

Access: Public Instant Grading

Ask
Dewey Compton
Start Exam
Danielrosenberger
Start Quiz
Copy and paste the following HTML code into your website or blog.
<iframe src="https://www.jobilize.com/embed/quiz-my-oca-mock-exam-by-mike-wolf" width="600" height="600" frameborder="0" marginwidth="0" marginheight="0" scrolling="yes" style="border:1px solid #CCC; border-width:1px 1px 0; margin-bottom:5px" allowfullscreen webkitallowfullscreen mozallowfullscreen> </iframe>