8.Methods:I Help?

I have looked through the comments on this and tried several times now but this is still not accepting my code. Am I missing something?


class Dog {
  int age;

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

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



ERROR MSG: did you type the command correctly? Make sure it’s inside the bark method.

ERROR CODE ON RIGHT: Dog.java:10: error: cannot find symbol
symbol: method printIn(String)
location: variable out of type PrintStream
1 error

Please can anyone advise? Thanks V much. :slight_smile:

im having the same problem and im getting the same error message.

You have used printIn instead of println.

Wow, can’t believe I missed that. Thank you albionsrefuge for your help. :smiley:

1 Like

A post was split to a new topic: Stilll getting same error

5 posts were split to a new topic: 8. Did you create a Dog object using the Dog constructor?