Java OCA OCP Practice Question 704

Question

Which of these classes are in the java.util package?

  • I. ArrayList
  • II. LocalDate
  • III. String
  • A. I only
  • B. II only
  • C. I and II
  • D. I, II, and III


A.

Note

The ArrayList class is in the java.util package, making I correct.

The LocalDate class is in the java.time package, making II incorrect.

The String class is in the java.lang package, which means you can use it without typing an import, making III incorrect.

Option A is correct.




PreviousNext

Related