There is a method that accepts a collection. I need to pass a single element to that method. What is the best way to do this? Which implementation of collection should I use?
java.util.Collections.singleton()
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With