Search:

Type: Posts; User: Za Voucha

Search: Search took 0.25 seconds.

  1. Replies
    9
    Views
    1,367

    Re: I have a problem with class inheritance.

    Thanks so much! That did it! I just had to turn all of the
    Animal.numberOfLegs
    Dog.numberOfLegs
    and Ant.numberOfLegs to just non-static numberOfLegs. Thanks!
  2. Replies
    9
    Views
    1,367

    Re: I have a problem with class inheritance.

    Ok so right now I'm taking off the word static in public static int numberOfLegs; I just got this error "error: non-static variable numberOfLegs cannot be referenced from a static context
    return...
  3. Replies
    9
    Views
    1,367

    Re: I have a problem with class inheritance.

    Thanks so much for taking the time to help! I'm not by my code right now to see if that works, but you seem right to me. I'll let you know how it goes.
  4. Replies
    9
    Views
    1,367

    I have a problem with class inheritance.

    Hi Everybody! I'm very new to Java. I started learning Java about 5 months ago in my high school computer science class, so I'm just a beginner. Earlier in class we were learning about inheritance...
  5. Replies
    6
    Views
    888

    Re: Looking for help - Beginner programming

    Change public HeartRates(_FirstName) to public HeartRates(String _FirstName). You need to tell the program what type of variable you are using in your constructor, so that's why you say String. I...
Results 1 to 5 of 5