title: Trouble in compiling the java code
body: <p>I wrote the following piece of code in sublime text on my macbook pro.
  I saved the file inside the java folder on my desktop. When I tried to compile the program and tried to execute it, I am getting the fallowing error message  " Error: Could not find or load main class Animals ".
  Could someone help me in compiling and running this program</p>
  
  <pre><code>package forest;
  class Animals{
  
      public static void main(String[] args)
      {
          Animals s = new Animals();
          Sring[] s2 = s.getAllAnimals();
  
      }
  
      public String[] getAllAnimals()
      {
          String[] s1= {"Lion", "Elephant", "Tiger","Deer","Wolf","Dinosar"};
          return s1;
      }
  }
  </code></pre>