What is the built in library function to compare two strings?
Answers
Answered by
0
answer is on behalf of bluej
to compare 2 strings
say
String x= qwerty
String y=QWERTY
There are 2 functions
1. boolean a = x.equals(y);
output : false
2. boolean a= x.EqualsIgnoreCase(y);
output : true
to compare 2 strings
say
String x= qwerty
String y=QWERTY
There are 2 functions
1. boolean a = x.equals(y);
output : false
2. boolean a= x.EqualsIgnoreCase(y);
output : true
Similar questions
English,
7 months ago