Java has problems


#1

Use Java7 instead of Java8, it seems they have used Test-Cases of some other question in Java8, and in Java7 too, change the argument of the function from array to list.