What is the best way to initialize an ArrayList in Java in a single line?

You already discovered one of the best ways to initialize an ArrayList in Java in a single line:

ArrayList<String> places = new ArrayList<>(Arrays.asList("Buenos Aires", "Córdoba", "La Plata"));

Why use this?

Concise and readable: Creates a mutable ArrayList that allows adding/removing elements later.

Potential drawback?

If you use*List places = Arrays.asList(…) without wrapping it in an ArrayList, the list becomes fixed-size, meaning add() or remove() will throw an exception.