Using Methods I spike.bark();


#1

Hi All,

Please can you assist, see screebshot below.
Is there an error in the code, or is it an issue with the code academy website?

Thanks!


#2

@dataace56658,
Try coding on separate lines....
like

class Dog {
   int age;
   public Dog(int dogsAge) {
      age = dogsAge;
   }
   public void bark() {
      System.out.println("Woof!"); 
   }
   public static void main(Strings[] args) {
      Dog spike = new Dog(5);
      spike.bark();
   }
}

To learn more about the "Aw Snap!" situation....
google search
== discussions / opinions ==
Aw snap site:stackoverflow.com

================================================

My experience:
Leave course & codecademy & browser
delete all cooky-files
wait, an hour before connecting to the particular course in codecademy


#3

Thank you. It worked in a different browser. :tada: