Search:

Type: Posts; User: Norm

Search: Search took 0.12 seconds.

  1. Replies
    38
    Views
    3,752

    Re: Program not printing anything

    You need to start with something simpler and build on it and learn the techniques.
    1)How to call a method.
    2)How to pass an arg to a method
    3)How to receive a return value from a method.
    ...
  2. Replies
    38
    Views
    3,752

    Re: Program not printing anything

    I suggest that you put this code aside for a while and work on a very simple program to see how to call a method.

    Write a new class with a main() method and one other method.
    Have the main()...
  3. Replies
    38
    Views
    3,752

    Re: Program not printing anything

    Please copy the text and paste it here. Images aren't that helpful.
  4. Replies
    38
    Views
    3,752

    Re: Program not printing anything

    Did you comment out the section that tries to read from the user?

    Is the program waiting for the user to enter something?
  5. Replies
    38
    Views
    3,752

    Re: Program not printing anything

    The printResults() method will print something when it is called. Can you copy the full contents of the console window from when you execute the program and paste it here?
  6. Replies
    38
    Views
    3,752

    Re: Program not printing anything

    Like this. Only test the class and its methods. Leave getting user input for later:



    import java.util.*;

    public class LetterDriver{
    public static void main(String[] args){
    /*
    ...
  7. Replies
    38
    Views
    3,752

    Re: Program not printing anything

    Is that message from your IDE? Have you tried executing the program from the command prompt using the java command?
  8. Replies
    38
    Views
    3,752

    Re: Program not printing anything

    Did you miss my suggestion:
    I suggest you comment out the while loop for now and just work with a String you define in the code for testing the methods in the LetterProfile class. Don't try to do...
  9. Replies
    38
    Views
    3,752

    Re: Program not printing anything

    I suggest you comment out the while loop for now and just work with a String you define in the code for testing the methods in the LetterProfile class. Don't try to do two things at the same time. ...
  10. Replies
    38
    Views
    3,752

    Re: Program not printing anything

    What is the while loop supposed to do? The program should ask a user a question BEFORE trying to read input from the user.

    You need to review how to create an instance of a class and call its...
  11. Replies
    38
    Views
    3,752

    Re: Program not printing anything

    Where is the driver code with the calls to the methods? I don't see them in the posted code.
  12. Replies
    38
    Views
    3,752

    Re: Program not printing anything

    Is this the same problem: http://www.javaprogrammingforums.com/whats-wrong-my-code/25599-java-program-letter-frequencies-help.html

    There needs to be calls made in the main() method to the methods...
Results 1 to 12 of 12