Quantcast
Channel: Search Results For: domain:java-demos.blogspot.in
Viewing all articles
Browse latest Browse all 23

Compare two strings in Java lexicographically

$
0
0

The compareTo(T ob) method in the Comparable class is implemented in the String class and this implemented method takes java.lang.String as parameter. This method compares two strings lexicographically. The term lexicographically might seem new and weird. Whatever, don't get worried. I'll explain this method in a very easy way.


Viewing all articles
Browse latest Browse all 23

Trending Articles