home *** CD-ROM | disk | FTP | other *** search
/ PC World 1998 October / PCWorld_1998-10_cd.bin / software / prehled / inprise / JSAMPLES.Z / Container6.java < prev    next >
Text File  |  1998-05-08  |  589b  |  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.