Home » JAVA Programming » Collections » Question
  1. Which of these methods can convert an object into a List?
    1. CopyList()
    2. singletonList()
    3. SetList()
    4. ConvertList()
    5. None of these
Correct Option: B

singletonList() returns the object as an immutable List. This is an easy way to convert a single object into a list. This was added by Java 2.0.



Your comments will be displayed only after manual approval.