Please help me.... why is it saying error despite it being correct?

If I am not wrong you misspelled dog :slight_smile: and also have not spaced the string correctly,

"your dpg ran" +feet + 'feet!"

should be,

"Your dog ran " + feet + " feet!"

1 Like

i have changed it but its still not working :sob:

i have changed it but its still not working

Please post your code instead of photos it is much more legible and easier to help you.

1 Like

class Dog {

int age;

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 static void main(String args) {

Dog spike = new Dog(5);
spike.bark();

}

You haven’t modified the string as i instructed you,

here,

exactly as the code in the instructions was written which is like this,

"Your dog ran " + feet + " feet!"

2 Likes

Has it worked?:slight_smile:

1 Like

yes it has… thank you so much :slight_smile:

1 Like