Sail E0 Webinar
Question
Which of these methods can convert an object into a List?
Options:
A .  SetList()
B .  ConvertList()
C .  singletonList()
D .  CopyList()
Answer: Option C


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



Was this answer helpful ?
Next Question

Submit Solution

Your email address will not be published. Required fields are marked *

Latest Videos

Latest Test Papers