Search:

Type: Posts; User: Norm

Search: Search took 0.10 seconds.

  1. Replies
    15
    Views
    1,715

    Re: Program doesn't work!

    The arg to the get() method on line 44 is past the end of the arraylist. Remember indexes range in value from 0 to the size-1. If the arraylist has 6 items, the max index is 5.
    Check that the code...
  2. Replies
    15
    Views
    1,715

    Re: Program doesn't work!

    That's good. It means there were no compiler errors.
    Or are you talking about when the code is executed?
    What does the program not do that makes you say "nothing happened"?

    What statements did...
  3. Replies
    15
    Views
    1,715

    Re: Program doesn't work!

    Please post the full text of the compiler's error message that includes the source statement with the error.
    The message should show the source with a ^ under the location of the error.
    Here is a...
  4. Replies
    15
    Views
    1,715

    Re: Program doesn't work!

    Read the API doc for the class to see how to use it.
  5. Replies
    15
    Views
    1,715

    Re: Program doesn't work!

    The compiler can not find a method named heap.
    There is an ArrayList named heap. Are you trying to get at its contents?
  6. Replies
    15
    Views
    1,715

    Re: Program doesn't work!

    Can you use the javac compiler to compile the code and generate error messages. I'm not familiar with what you have posted.


    heap(t) > heap(t/2)
    Where is the heap() method defined? The above...
  7. Replies
    15
    Views
    1,715

    Re: Program doesn't work!

    Please copy the full text of the error messages and paste it here.


    The post code needs to be wrapped in code tags and properly formatted.
    Unformatted code is hard to read and understand.
  8. Replies
    15
    Views
    1,715

    Re: Program doesn't work!

    Please edit your post and wrap your code with code tags:


    <YOUR CODE HERE>

    to get highlighting and preserve formatting.

    Move all the }s to their own line and align them with the statement...
Results 1 to 8 of 8