...



Code:
package pizza;

public class Rhino {

    ...

    public static class Goat {
        ...
    }
}
http://stackoverflow.com/questions/7...c-nested-class

Code:
public class Filter {
   Vector criteria = new Vector();
   public addCriterion(Criterion c) {
      criteria.addElement(c);
   }
   public boolean isTrue(Record rec) {
      for(Enumeration e=criteria.elements();
      e.hasMoreElements();) {
         if(! ((Criterion)e.nextElement()).isTrue(rec))
             return false;
      }
      return true;
   }
   public static class Criterion {
      String colName, colValue;
      public Criterion(Stirng name, String val) {
         colName = name; colValue = val;
      }
      public boolean isTrue(Record rec) {
         String data = rec.getData(colName);
         if(data.equals(colValue)) return true;
         return false;
      }
   }
}
http://www.javaworld.com/javaqa/1999...c2.html?page=2

both are perfectly legal. a 2 minute google search could have shown you exactly in what way you were wrong, but i guess you're too lazy to get to that in addition to being disposed to casually asserting blatant falsehoods. now get out of my thread. you have compoundedly ruined my mood.