Problem with Object-Oriented Java 10

Ran into a problem on the first step of the exercise.

The instruction is the following:

In between the bark and main methods, add a method called run to the Dog class by typing:
public void run() {...}

Here is my code:

class Dog {
  int age;

	public Dog(int dogsAge) {
  	age = dogsAge;
  public void bark() {
  public void run() {

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



As far as I can see, the bark method is in between the main and bark methods.

Error message:

Did you create the run method? Place it between the bark and main method.

I have no idea what to look for because as far as I know, I have completed the first instruction.

Thanks! :slight_smile:

All good, I just had to complete the whole exercise at once.

For someone else who has the same problem, read the faded instructions to complete the whole exercise at once rather than step by step!

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.