Did the code but it still not working but code correct


#1

did the code but it still not working but code correct
here code

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();
    spike.run(40);

	}

}

11. Using Methods: II - I get an error but the code is correct
#2

Which exercise is this?

Please post a screen shot of your whole browser so that we can see which instruction steps are still red.


#3

You forgot to put public in front of class and try to name the file Dog.java!


#4

I'm having the same problem. I'm on Mac/Chrome I'm not sure if that affects this but it should work. I think this is a bug.