10. I am having a problem with Number 10


#1

Hello My name is Ricky I am taking the Learn Java Tutorial and I am having a problem with Number 10: Methods and after I have put in the code that the course has given me it still will not let me move pass this point, once I hit run it gives the message "Did you create the run method? Place it between the bark and main method. ", and it will not allow me to click Next. Could someone please assist me with this problem! Thanks!


Welcome to our forums! Please Introduce Yourself
#2

@objectcoder59831 if you can post your code here so we can see it, we can help troubleshoot the problem.


#3

Hi i had the same problem. That part has 4 step exercise, but the code help fills in all the codes for all steps. I guess this is a bug


#4

your code should be:
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);

}

}