Search:

Type: Posts; User: Norm

Search: Search took 0.12 seconds.

  1. Replies
    14
    Views
    1,508

    Re: Program not printing anything II

    For testing I suggest that you comment out the scanner and the loop and define a String to scan in the program.
    When the code can scan and report on that String, then you can restore the loop etc....
  2. Replies
    14
    Views
    1,508

    Re: Program not printing anything II

    Why does the program want to scan lines of text? What is the purpose of doing that?

    The posted code is not formatted properly. Nested statements within {}s should be indented 3-4 spaces. All...
  3. Replies
    14
    Views
    1,508

    Re: Program not printing anything II

    Please edit your post and wrap your code with


    <YOUR CODE HERE>

    to get highlighting and preserve formatting.

    What is the purpose of the Scanner object and the while loop?
  4. Replies
    14
    Views
    1,508

    Re: Program not printing anything II

    Someone somewhere thinks that the main() method testing MUST be in a special class, not in the class that is being tested.
    Personally I think the testing code (the main() method) should be in the...
  5. Replies
    14
    Views
    1,508

    Re: Program not printing anything II

    I suggested this on the other thread. Learn the techniques by writing a small simple program.
    Then add to it to learn how to use methods.
    I suggest that you put this code aside for a while and...
  6. Replies
    14
    Views
    1,508

    Re: Program not printing anything II

    Please start your own thread for your problem.

    Where is the class with the main() method. That is where the program's execution starts.

    Please edit your post and wrap your code with

    ...
Results 1 to 6 of 6