Same problem


#1

Same problem.

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

	}
}

What's wrong with my method code?
#2

Hi you have more } than you need maybe if uou see your code like that you'll see it

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