CSS font stacks & developer FAQs with Web standards
Site navigation below

One of hundreds of answers available with our premium content service.

Part answer

A: Java strings are stored as an immutable sequence of Unicode characters and the class' equals() method is overridden to compare that character content, so standard logical comparison operators will not give the result one might expect. If you use the simple comparison operator on two string objects that represent the same string, it will return false. Always use the equals(Object) method to compare the contents of two strings, as below.

… full answer hidden

Click for full answers

Premium members click below for full answer
The == operator doesn't match strings correctly!

Home · Web fonts · Font stacks · FAQs · Java · CSS · Javascript · HTML · Site manager