your Hashtable h has three copies of v1
(currently h.get("he").equals(X) returns true for "me" and "she")
the description of the situation suggests that youy want h to have three vectors, each with it's own elements.
v1=new Vector(2,2);
v2= new Vector(2,2);
v3= new Vector(2,2);
v1.add("hi");
v1.add("bye");
v1.add("yo");
v2.add("bike");
v2.add("bus");
v2.add("car");
v3.add("sis");
v3.add("dad");
v3.add("mom");
h.pu t("he",v1);
h.put("she",v2);
h.put("me",v3);
try
{
h.writeObject(new ObjectOutputStream
(new FileOutputStream("ht.oof"))
}catch(Exception XX){XX.printStackTrace(); }
reading back
HashTable h2=null;
try
{
InputStream in = new ObjectInputStream(new FileInputStream("ht.oof")); // rem use same filename ... i use a 'custom' extension ".oof" (ObjectOutFile)
try
{
h2= (HashTable) in.readObject();
} catch(ClassCastExcption ccx){}
}catch(IOException iox ){}
Vector vhe,vshe =null,vme;
// Enumeration keys = h2.keys(); -if keys were unknown.
try
{
vshe=(Vector) h2.get("she");
} catch(ClassCastExcption ccx){}
k-0;
while (k<vshe.size()) System.out.println(vshe.get(k++).toString() );