Plz help me out..the compiler is showing me the output but it is not taking me to the next page in 9/13


#1

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(6);
spike.bark();
}
}

Did you call the bark method on the spike object? Make sure you call it inside of the main method.
Run


#2

i think you miss a !

it should be same as codecademy wants even a space
you can copy the sentence


#3

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