Using Methods I


Hey everyone -- Having a problem with this exercise. I followed the tips on ( and I'm still having problems. Any help would be appreciated.

class Dog {

int age;

public Dog(int dogsAge) {

	age = dogsAge;


public void bark() {



public static void main(String[] args) {

Dog spike = new Dog(7);


The following error comes up error: reached end of file while parsing
1 error


For every { you need a }


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


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

It works now