I do not understand why the following code:
public Image getLetter(String letterToGet)
{
System.out.println("é" == "e");
System.out.println("Received: " + letterToGet);
if("\u00e9" == letterToGet.toLowerCase()); {
letterToGet = "SPECIALACCTAIGUESPECIAL";
}
if("\u00e8" == letterToGet.toLowerCase()) {
letterToGet = "SPECIALACCTGRAVESPECIAL";
}
System.out.println("searching for " + letterToGet + " in the hashmap");
return languageMap.get(letterToGet.toLowerCase());
}
Can return the following ouput
Traduction following ArrayList: [e, é, è]
Received: e
searching for SPECIALACCTAIGUESPECIAL in the hashmap
Received: é
searching for SPECIALACCTAIGUESPECIAL in the hashmap
Received: è
searching for SPECIALACCTAIGUESPECIAL in the hashmap
Following this logic, why does this line return false?
System.out.println("\u00e9" == "e");