The Java Program: 9-more-library-puzzlers/puzzle-80/Outer.java

  1 public class Outer {
  2     public static void main(String[] args) throws Exception {
  3         new Outer().greetWorld();
  4     }
  5 
  6     private void greetWorld() throws Exception {
  7         System.out.println(Inner.class.newInstance());
  8     }
  9 
 10     public class Inner {
 11         public String toString() {
 12             return "Hello world";
 13         }
 14     }
 15 }