This seems like a funny way to create the list. I thought it would be more like the below: ArrayList<> list = new ArrayList<>();