java initialize list with values one line code example Example: list java initialize List<MyType> myList = new ArrayList<MyType>();