Search:

Type: Posts; User: Norm

Search: Search took 0.18 seconds.

  1. Replies
    5
    Views
    1,432

    Re: What does compareTo method of String do ?

    Reread the API doc. Its explained there.
    Why go past the first character of the two Strings if they are different.
    Execute this:

    System.out.println('a'-'r'); // compare first two characters
  2. Replies
    5
    Views
    1,432

    Re: What does compareTo method of String do ?

    The API doc defines what the method returns.
    What definition did google give for: lexicographical

    Did you read the API doc for the method? It is explained there.
Results 1 to 2 of 2