Methods I what does spike.bark(); stand for at the end. is it ever explained?


class Dog {

int age;

public Dog(int dogsAge) {
age = dogsAge;


public void bark() {



public static void main(String[] args) {

Dog spike = new Dog(5);



  • spike is the name of the new Dog that you created (an object)
  • bark() is a bit of code that you wrote that prints "Woof!" when you call it (a method that is defined for all Dog objects)


I left this out at the end I re-added spike.bark() from the last code.





Maybe if I take the spike.bark(); maybe it will work I am going to see, thanks for the assistance, I will let you know.


Same thing, it is the code that CodeCademy placed in it, it works it just will not allow me to move to the next set of instructions


Reset that exercise, then do one step at a time and click Run. When you get to the point where it doesn't work, please post a screenshot so we can see what you see.