Search:

Type: Posts; User: AraHabs

Search: Search took 0.24 seconds.

  1. Replies
    9
    Views
    1,009

    Re: Help with get and set

    Ok yeah, I get it.

    I will try to do it and let you know.

    EDIT:

    It works!! Thanks alot!!!

    Thanks for your help,
    Ara
  2. Replies
    9
    Views
    1,009

    Re: Help with get and set

    Ok,
    So when I have the get in my class Ball, the get returns 0.
    So to try it out, I took out the get in the class Ball and put a get right after the set.

    And it returns the right number.

    A...
  3. Replies
    9
    Views
    1,009

    Re: Help with get and set

    I added a println in teh constructors like you said.

    So it gives this:


    public void setY(int a){
    this.y = a;
    System.out.println("SET"+this.y);
    }
  4. Replies
    9
    Views
    1,009

    Re: Help with get and set

    I placed a println Right after the setY() in the class Raquette and it showed the right value.
    I placed a println Before using the getY() in the class Ball and it shows 0.
  5. Replies
    9
    Views
    1,009

    [SOLVED]Help with get and set

    Hi guys,

    Ok so I have to do a Pong type game for school.

    So far, I am doing it with a mousemotion listener. But the thing is, I have 2 classes, Raquette and Ball.

    the Raquette class contains...
Results 1 to 5 of 5