Re: How to check variables for uniqueness ?



Oliver Wong wrote:
Try this example:

{
System.out.println("beißen".equalsIgnoreCase("BEISSEN"));
System.out.println("beißen".toUpperCase().equals("BEISSEN"));
}

John Ersatznom wrote:
... The "equalsIgnoreCase"
method should ignore case, but not spelling. It shouldn't consider ... "beißen" equal to "beissen" either. Why? Because those pairs differ by spelling and not just capitalization!

That is how equalsIgnoreCase() works:

"beißen".equalsIgnoreCase("BEISSEN"): false

- Lew
.



Relevant Pages