EDIT Thanks for the prompt responses. Please see what the real question is. I have made it bold this time.
I do understand the difference between ==
Why not use:
if (value != null && value.length == 0) {
// do stuff (above could be "== null ||"
}
You should use equals() because == for objects compares references, i.e., are they the same object. Whilst at compile time Java finds identical strings and makes them share the same reference (Strings are immutable), at runtime it is easy to create empty strings that have different references, where == fails for your typical intention of equals().