java if two string are equals length code example Example: how to know if String is the same java String1.equals(String2)