Results 1 to 7 of 7
  1. #1
    Mirix is offline Member
    Join Date
    May 2010
    Location
    Alexandria, VA
    Posts
    14
    Rep Power
    0

    Default Error Explanation? :)

    Would someone explain to me what the error message at the bottom mean and suggest a way that I may be able to fix it please? Thank you in advanced :)

    Last edited by Mirix; 05-23-2010 at 02:13 AM.

  2. #2
    gcalvin is offline Senior Member
    Join Date
    Mar 2010
    Posts
    953
    Rep Power
    5

    Default

    It means that there is no Climber() constructor that takes four int parameters (which is what you are trying to call).

    -Gary-

  3. #3
    gcalvin is offline Senior Member
    Join Date
    Mar 2010
    Posts
    953
    Rep Power
    5

    Default

    The Climber() constructor that's visible takes a single int x, so you probably want this:

    Java Code:
            public StepClimber(int x) {
                    super(x);
            }
    -Gary-

  4. #4
    Mirix is offline Member
    Join Date
    May 2010
    Location
    Alexandria, VA
    Posts
    14
    Rep Power
    0

    Default

    Quote Originally Posted by gcalvin View Post
    The Climber() constructor that's visible takes a single int x, so you probably want this:

    Java Code:
            public StepClimber(int x) {
                    super(x);
            }
    -Gary-
    If I want to change the Climber() constructor so it would take four int parameters, would I change it to this?

    Java Code:
       public Climber(int x, int y, int dir, int beep)
       {
          super(x, y, int, beep);
       }
    And thank you for the reply :D

  5. #5
    gcalvin is offline Senior Member
    Join Date
    Mar 2010
    Posts
    953
    Rep Power
    5

    Default

    I don't know what you want Climber or StepClimber to do, so I have no way of knowing if that is what you want.

    -Gary-

  6. #6
    gcalvin is offline Senior Member
    Join Date
    Mar 2010
    Posts
    953
    Rep Power
    5

    Default

    Also, you don't necessarily need to change the existing constructor. You can add another constructor with the signature you want.

    -Gary-

  7. #7
    Mirix is offline Member
    Join Date
    May 2010
    Location
    Alexandria, VA
    Posts
    14
    Rep Power
    0

    Default

    Quote Originally Posted by gcalvin View Post
    Also, you don't necessarily need to change the existing constructor. You can add another constructor with the signature you want.

    -Gary-
    gotcha! :) aha, thank you, I finished my lab ^^ couldn't have done it without your help!

Similar Threads

  1. need explanation
    By marie in forum New To Java
    Replies: 2
    Last Post: 03-21-2010, 04:35 PM
  2. need code explanation
    By marie in forum New To Java
    Replies: 3
    Last Post: 03-05-2010, 01:41 AM
  3. Class explanation
    By mcal in forum New To Java
    Replies: 1
    Last Post: 02-05-2008, 07:50 PM
  4. need a little explanation
    By cew27 in forum New To Java
    Replies: 7
    Last Post: 12-14-2007, 12:39 AM
  5. I need didactic explanation
    By Eric in forum New To Java
    Replies: 2
    Last Post: 07-02-2007, 06:37 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •