Need help with Methods


#1

The instructions said to add a method called Bark to the Dog class and that is exactly what I did. It's still not letting me move forward with the course ...can someone please tell me what I did wrong??

class Dog{
  
  int age;

	public Dog(int dogsAge) {
    
    age = dogsAge;
    
  }
  
  public void bark( ) {
    
    System.out.println("Woof!");
    
  }


	public static void main(String[] args) {
    
    Dog spike = new Dog(7);

	}

}

#2

Nevermind, I resolved it.


#3

How did you resolve it please? the exact same issue is happening to me?


#4

I was having an issue on the following problem that was caused by not capitalizing the W in "Woof!".

Seems like it's very picky as far as capitalization and spacing, even though I was doing exactly what it asked.

Hope this helps!


#6

contre1 how did you resolve the bark() method issue please I am having the exact same problem and cannot move forward?


#7

Hi no unfortunatly it wont let me move forward