Developer's Daily Java Education - Test Projects
  front page | java | perl | unix | DevDirectory
   
Front Page
Java
Education
   
 


public class Main
{
  public Main() {
    Animal fido = new Dog();
    Animal bigbird = new Bird();
    System.out.println( "fido says " + fido.speak() );
    System.out.println( "bigbird says " + bigbird.speak() );
  }

  public static void main(String[] args) {
    new Main();
  }
}
Copyright 1998-2003 DevDaily Interactive, Inc.
All Rights Reserved.