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 >
Wrap
Text File
|
1998-05-08
|
589b
|
20 lines
// Copyright(c) 1996,1997 ObjectSpace, Inc.
import com.objectspace.jgl.*;
import Company;
public class Container6
{
public static void main( String[] args )
{
Company company1 = new Company( "ObjectSpace" );
Company company2 = new Company( "Sun Microsystems" );
HashMap headquarters = new HashMap();
headquarters.put( company1, "Texas" );
headquarters.put( company2, "California" );
String location = (String) headquarters.get( company1 );
System.out.println( "The headquarters of " + company1 + " are in " + location );
}
}