• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 234
  • Last Modified:

string.compareTO(string);

what does this function returns ?
i tried and it returns numbers
0 if equals ?
how about the others ?
0
prinx
Asked:
prinx
1 Solution
 
Peter KwanCommented:
Return value of a.compareTo(b), where a and b are both of type String:

If a is equal to b, then 0.
If a is lexicographically less than b, then a value less than 0.
If a is lexicographically greater than b, then a value greater than 0.

For more info, please read:
http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html#compareTo(java.lang.String)
0
 
prinxAuthor Commented:
yea i read that, sorry for not being clear but what i mean it the return value what does it means for eg it returns 25 for one time..why 25 ?
0
 
OviCommented:
Probably the algorithm of the method use some control values (distances) which are returned.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now