home *** CD-ROM | disk | FTP | other *** search
/ BUG 15 / BUGCD1998_06.ISO / aplic / jbuilder / jsamples.z / Container6.java < prev    next >
Encoding:
Java Source  |  1997-07-30  |  589 b   |  20 lines

  1. // Copyright(c) 1996,1997 ObjectSpace, Inc.
  2. import COM.objectspace.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.