Dog.java


#1

Not sure why it isn't working


#2

Hey @tagjumper64258, take a closer look at it.

It wants

public void run() {

You're code

public void run () {

#3

Still didn't work
public void run() {
}


#4

Do you have the same error?

I went back and took a look into my code & I have
everything exactly as you as far as I can see. What
I explained earlier in my post doesn't seem to matter.

I'm new to programming so I was just trying to help
a bit. If you're stuck on it too long try restarting the
exercise with the "Get Help" button in bottom right
corner. It may just be bugged as far as I can tell
but then again I may be wrong.


#5

Yes im receiving the same error


#6

Having issues again

//Class - Describes the instructions for hte data structure. Ex. || class Dog
//Method - Is a pre-defined set of intruuctions to define action within a class
class Dog {

  //Instance Variable - Specific details that will be used      in the class Ex. || int Dog
  int Age; 

    //Constructor - ALllows the user to create instances     			within the class. Ex. || public Dog
    //Parameters - Allows data types to be created with specified attributes. Ex. || (int dogsAge)
    //Contructor block - Space within { } 
  public Dog(int dogsAge) {
    Age=dogsAge;
  }

   public void bark() {
     System.out.println("Woof!");
   } 

  public void run(int feet) {
     System.out.println("Your dog ran " + feet + " feet!");
  }

  public int getAge() {
   return Age;  

  }

//Java default main method 
 //Object - Is the instance of a class Ex. || Dog \\\   		Ex. Dog spike = Dog(12);
	public static void main(String [] args) {
    Dog Spike = new Dog(12);  
    Spike.bark(); 
    Spike.run(12); 
    int spikeAge = spike.getAge();
    System.out.println(spikeAge);

  }


}

Error:

Dog.java:34: error: cannot find symbol
    int spikeAge = spike.getAge();
                   ^
  symbol:   variable spike
  location: class Dog
1 error

#7

Ok, this time I see you're mistake. You have capital
S on when you're calling you're spike object. Needs
to be lower cased.