I have 2 java lists
ArrayList<String> list1 = new ArrayList<String>();
ArrayList<String> list2 = new ArrayList<String>();
I load some data from the database to the first one and from diffrent database to the second one.
The strings in the lists look exactly the same:
3441134 China Ap F
3441134 China Ap F
But when I check:
if(list1.get(1).equals(list2.get(1))){
logger.info("true");
}
else{
logger.info("false")
}
I always get
false
Can somebody say why? I checked white spaces and it's the same too.