Using Methods I


#1

Hey everyone -- Having a problem with this exercise. I followed the tips on (http://discuss.codecademy.com/t/9-using-method-i/7537) and I'm still having problems. Any help would be appreciated.

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


#2

The following error comes up

Dog.java:20: error: reached end of file while parsing
}
^
1 error


#3

For every { you need a }


#4

you are missing a closing bracket after the main method. let me know if this helps.


#5

Thank you ionatan and coremaster05395 -- How could I have been so blind?!

It works now