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!"


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.


class Dog {

int age;

public Dog(int dogsAge) {
age = dogsAge;


public void bark() {



public void run(int feet){

 system.out.println("your dog ran" + feet + "feet!");

public static void main(String[] args) {

Dog spike = new Dog(5);



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


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

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


Has it worked?:slight_smile:


yes it has.... thank you so much :slight_smile: