Back
You can use te=he simple localCompare() function:
string_a.localeCompare(string_b);/* Expected Returns: 0: exact match-1: string_a < string_b 1: string_a > string_b */
string_a.localeCompare(string_b);
/* Expected Returns:
0: exact match
-1: string_a < string_b
1: string_a > string_b
*/
I hope this will help.
Want to become a Java Expert? Join Java Training now!!
Want to know more about Java? Watch this video on Java Tutorial | Java Course:
31k questions
32.8k answers
501 comments
693 users