Card 3 / 76: 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.*;
Answer:
B) import java.util.*;
Previous Card | ← Previous Card Button |
Next Card | → Next Card Button |
Flip Card | Space-Bar |
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.
|