You can use like this instead:
System.out.println(l.get(0).equals(l.get(1)));
You are comparing Objects, instead of primitives.
1.4m articles
1.4m replys
5 comments
57.0k users