how to initialize a list in java with values code example Example: list java initialize List<MyType> myList = new ArrayList<MyType>();