In Java 9+ you can use List.of to conveniently produce an unmodifiable list.
var x = List.of("xyz", "abc");
// 'var' works only for local variables
Java 8 using Stream:
Stream.of("xyz", "abc").collect(Collectors.toList());
Or, in Java 16+, more briefly done with toList:
Stream.of("xyz", "abc").toList());
And of course, you can create a new object using the constructor that accepts a Collection:
List<String> x = new ArrayList<>(Arrays.asList("xyz", "abc"));
Tip: The docs contains very useful information that usually contains the answer you're looking for. For example, here are the constructors of the ArrayList class:
Constructs an empty list with an initial capacity of ten.
Constructs a list containing the elements of the specified collection, in the order they are returned by the collection's iterator.
Constructs an empty list with the specified initial capacity.