public class BBook1
{
   public static void main(String[] args)
   {
      Birthday[] friends = new Birthday[3];  // storage for the birth dates

      try
      {
        friends[0] = new Birthday("Jim Brown", 12, 31);
        friends[1] = new Birthday("Mad Max", 4, 32);
        friends[2] = new Birthday("Mike2", 2, 12);
      }
      catch (Exception e)
      {
        System.out.println(e.getMessage());
      }

      for (int i=0; i<friends.length; i++)   // print all records 
        System.out.println(friends[i]);      // the toString method will be
                                             //  invoked here
   }
}

















 
