write two difference between equals ( ) method and equals Ignore Case
Answers
Answered by
3
Heya user
Here is your answer !!
In the string function, equals ( ) , the two strings are compared and returns true only if they are exactly the same , i.e. , even their case is same .
In the string function, equals Ignore Case ( ) , the two strings are compared and returns true even if their case is different .
For example ,
APPLE and APPLE will retuen true for both these operators .
But , APPLE and Apple will return true only for equals Ignore Case ( ) but will return false for equals ( ) .
Hope it helps !!
Here is your answer !!
In the string function, equals ( ) , the two strings are compared and returns true only if they are exactly the same , i.e. , even their case is same .
In the string function, equals Ignore Case ( ) , the two strings are compared and returns true even if their case is different .
For example ,
APPLE and APPLE will retuen true for both these operators .
But , APPLE and Apple will return true only for equals Ignore Case ( ) but will return false for equals ( ) .
Hope it helps !!
Answered by
0
Hello!
equals(): it is used to check two strings together and return a boolean type value.
equalsIgnoreCase(): it is used to check two strings without considering upper case and lower case to be same i.e,after ignoring case
equals(): it is used to check two strings together and return a boolean type value.
equalsIgnoreCase(): it is used to check two strings without considering upper case and lower case to be same i.e,after ignoring case
Similar questions