Sponsored Link •
|
Advertisement
|
Advertisement
|
This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.
Message:
> Have a do..while loop that loops until the user enters a blank line. Have an integer variable that counts the number of lines. Here is an example:
> Also, if you wanted to keep the user input, everytime you call the readLine method, add the result of that method to the end of the variable line (assuming line is a string), like so: >
> Hope this helps. > Hiran > > I've started java like two weeks ago and there is a part of a program that I am stuck on, I'm supposed to make part of the program do this: > > number of lines:2 > > so far all I have is: > > Can you guys help me on what to do next? I don't know how to make the program accept multiple lines and count the number of lines made. Thanks a lot.
Replies: |
Sponsored Links
|