To compare strings in Java, use the `.equals()` method for value comparison, as `==` compares object references.