So if I have the following string:
str1 = "158514831248";
str2 = "124875257821";
If I do str1.compareTo(str2), it should return value greater than zero right?
Basically, I have an array of string with millisecond time. I want to sort them using string compareTo(), I don't want to convert it to long for comparison.
would it work?
Thanks.
str1 = "158514831248";
str2 = "124875257821";
If I do str1.compareTo(str2), it should return value greater than zero right?
Basically, I have an array of string with millisecond time. I want to sort them using string compareTo(), I don't want to convert it to long for comparison.
would it work?
Thanks.