I know in java we can use the .equals method to compare if two strings are equal. But what if the 2 strings are extremely long such as the following:
String s1 = "t was her sister Josephine who told her, in broken sentences; veiled hints that revealed in half concealing. Her husband's friend Richards was there, too, near her. It was he who had been in the newspaper office when intelligence of the railroad disaster was received, with Brently Mallard's name leading the"
String s2 = "t was her sister Josephine who told her, in broken sentences; veiled hints that revealed in half concealing. Her husband's friend Richards was there, too, near her. It was he who had been in the newspaper office when intelligence of the railroad disaster was received, with Brently Mallard's name leading the"
if s1.equals(s2) return true;
will .equals still work if the strings being compared are huge? is there any limit? I need to know what is the BEST way to compare 2 long strings.