Which of these methods can convert an object into a List?
A. SetList()
B. ConvertList()
C. singletonList()
D. CopyList()
Answer:A
Which of these methods can convert an object into a List?
A. SetList() B. ConvertList() C. singletonList() D. CopyList()
Explanation: 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.