Collections.singletonList() returns an immutable collection, but the length of the collection is only 1, which can reduce memory space. But the returned value is still the internal implementation class of Collections, and there is also no add method. Calling the add and set methods will report an error.
test
public class Test {
public static void main(String[] args){
List<String> list=Collections.singletonList("111");
System.out.println(list);
}
}
Output: