home *** CD-ROM | disk | FTP | other *** search
/ ActiveX Programming Unleashed CD / AXU.iso / jgl_1_1 / examples / container6.java < prev    next >
Encoding:
Java Source  |  1996-07-14  |  570 b   |  21 lines

  1. // Copyright(c) 1996 ObjectSpace, Inc.
  2. import jgl.*;
  3. import Company;
  4.  
  5. public class Container6
  6.   {
  7.   public static void main( String[] args )
  8.     {
  9.     Company company1 = new Company( "ObjectSpace" );
  10.     Company company2 = new Company( "Sun Microsystems" );
  11.  
  12.     HashMap headquarters = new HashMap();
  13.     headquarters.put( company1, "Texas" );
  14.     headquarters.put( company2, "California" );
  15.  
  16.     String location = (String) headquarters.get( company1 );
  17.     System.out.println( "The headquarters of " + company1 + " are in " + location );
  18.     }
  19.   }
  20.  
  21.