I have tried below code
String s[]={\"1\",\"2\",\"3\",\"4\"}; Collection c=Arrays.asList(s); System.out.println(c.remove(\"1\") +\" remove flag\"); Syste
A one liner fix is to declare your list like this:
List list2 = new ArrayList<>(Arrays.asList(0,8,1,5,7,0));