create list with items in java on one line code example Example: java instantiate list with value List<String> strings = Arrays.asList("foo", "bar", "baz");