Search:

Type: Posts; User: Mrcinica

Search: Search took 0.28 seconds.

  1. Replies
    15
    Views
    497

    Re: Program doesn't work!

    I tried to run program, after first correct output , I get this:
    Exception in thread "main" 32
    java.lang.IndexOutOfBoundsException: Index: 6, Size: 6
    at java.util.ArrayList.rangeCheck(Unknown...
  2. Replies
    15
    Views
    497

    Re: Program doesn't work!

    First, I got error in this function:


    public static void insert (int x)
    {
    heap.add(x);
    int t = heap.size() - 1;
    while (t/2 && heap.get(t)>heap.get(t/2))
    {
    int temp =...
  3. Replies
    15
    Views
    497

    Re: Program doesn't work!

    Can you tell me what this error mean:
    error: Class names, 'Rad', are only accepted if annotation processing is explicitly requested
    1 error
  4. Replies
    15
    Views
    497

    Re: Program doesn't work!

    Yes.
  5. Replies
    15
    Views
    497

    Re: Program doesn't work!

    Rad.java:41: error: cannot find symbol
    while (t/2 && heap(t)>heap(t/2))
    ^
    symbol: method heap(int)
    location: class Rad
    Rad.java:41: error: cannot find symbol
    while (t/2 &&...
  6. Replies
    15
    Views
    497

    Re: Program doesn't work!

    The mistake is in this function:


    public static void insert (int x)
    {
    heap.add(x);
    int t = heap.size() - 1;
    while (t/2 && heap(t) > heap(t/2)) // error
    {
    int temp =...
  7. Replies
    15
    Views
    497

    Re: Program doesn't work!

    I found mistake and fixed 1 line, but, can you tell me ,how to defined heap(int) in this line : while (t/2 && heap(t)>heap(t/2))
    Java problem: The method heap(int) is undefined for the type "Rad"
  8. Replies
    15
    Views
    497

    Program doesn't work!

    I hope that I translate task well :
    A bread is being sold at the bakery. At the start of the day n bread are baked each of them with quality x. As time passes new bread are baked with various...
Results 1 to 8 of 8