It looks like you have one element in your list, and that element's toString()
method returns the empty String
. This produces the output []
while returning false
for isEmpty()
:
List<String> output = Arrays.asList("");
System.out.println(output);