I have a question about comparing a string with the empty string in Java. Is there a difference, if I compare a string with the empty string with == or eq
==
eq
It's a bit sideways from your original question, but there's always
if(s1.length() == 0)
I believe this is equivalent to isEmpty() method from 1.6.