Search:

Type: Posts; User: Norm

Search: Search took 0.13 seconds.

  1. Thread: Matrix Generator

    by Norm
    Replies
    29
    Views
    3,780

    Re: Matrix Generator

    Are the methods being called? Add some println statements to each method and constructor to print a message when it is executed so you can see if the methods are being executed.
  2. Thread: Matrix Generator

    by Norm
    Replies
    29
    Views
    3,780

    Re: Matrix Generator

    Please post the program's output and add some comments to it that describes what is wrong with the output and show what the output should be.
  3. Thread: Matrix Generator

    by Norm
    Replies
    29
    Views
    3,780

    Re: Matrix Generator

    Is it defined to throw an exception? If so, put it in try/catch for that exception.
  4. Thread: Matrix Generator

    by Norm
    Replies
    29
    Views
    3,780

    Re: Matrix Generator

    It depends on the methods. If they are defined to throw an exception, then you would need to be ready to handle that exception by putting the calls to the methods in a try/catch block.
  5. Thread: Matrix Generator

    by Norm
    Replies
    29
    Views
    3,780

    Re: Matrix Generator

    What about the main() method?
    How are you executing the code? If you try to execute a class without a main method the java command will give an error message. So if you have a println in the main()...
  6. Thread: Matrix Generator

    by Norm
    Replies
    29
    Views
    3,780

    Re: Matrix Generator

    Did you add printlns to all the methods and constructors?
    Did any of them print out a message?
    They won't print anything if they are not executed. Check the code to see why none of the...
  7. Thread: Matrix Generator

    by Norm
    Replies
    29
    Views
    3,780

    Re: Matrix Generator

    Where is the execution flow going in the program? Add some println statements to all the methods to print to a message when they are executed. Check that the code is calling the methods that you...
  8. Thread: Matrix Generator

    by Norm
    Replies
    29
    Views
    3,780

    Re: Matrix Generator

    ClassWithMethod cwm = new ClassWithMethod(); // create instance of class
  9. Thread: Matrix Generator

    by Norm
    Replies
    29
    Views
    3,780

    Re: Matrix Generator

    You need to create an instance of the class to be able to call a non-static method in that class.

    Please Edit your post and wrap your code with
    <YOUR CODE HERE> to get highlighting
  10. Thread: Matrix Generator

    by Norm
    Replies
    29
    Views
    3,780

    Re: Matrix Generator

    To execute a class using the java command, the class must have a correct main() method.

    Please post the full text of the compiler error message.
  11. Thread: Matrix Generator

    by Norm
    Replies
    29
    Views
    3,780

    Re: Matrix Generator

    What happens when you try to execute the program? I don't see a main() method.
  12. Thread: Matrix Generator

    by Norm
    Replies
    29
    Views
    3,780

    Re: Matrix Generator

    The compiler sees that the variables are incompatible types.
    It can not find the methods: getKey and getValue in the class: Map.
  13. Thread: Matrix Generator

    by Norm
    Replies
    29
    Views
    3,780

    Re: Matrix Generator

    Please post the full text of the error messages.
    Or explain what the problem is.
Results 1 to 13 of 13