A string is a character array, so you can compare them one character at a time:
String x = "test"
String y = "test"
for(int i = 0; i < x.length && i < y.length; i++)
{
if(x[i] != y[i])
return false;
}
return true;
Copyright © 2026 eLLeNow.com All Rights Reserved.