Search:

Type: Posts; User: Norm

Search: Search took 0.12 seconds.

  1. Replies
    9
    Views
    1,230

    Re: Help with this names program

    You're welcome.
  2. Replies
    9
    Views
    1,230

    Re: Help with this names program

    You only need ONE test to see if the current name is longer than the longest one saved so far.
    Try rewriting your code to use only one test. Save the String itself not the length of the String....
  3. Replies
    9
    Views
    1,230

    Re: Help with this names program

    You could use the length() method of String itself vs some variable that contains the length of the String.

    What values are in these variables: name1length & namelength
    and these: longest, name...
  4. Replies
    9
    Views
    1,230

    Re: Help with this names program

    Please explain and show your code.
  5. Replies
    9
    Views
    1,230

    Re: Help with this names program

    You need a sort or a search to go through the list of names you have and find the longest one.
    Or you could save the longest one as you are reading them in. As you read the names, see if the new...
Results 1 to 5 of 5