Package java.util
Class Hashtable

Public Method clone

Object clone()

Overrides:

_INSERT_METHOD_SIGNATURE_HERE_

Description:

Creates a shallow copy of this hashtable. All the structure of ths hashtable itself is copied, but the keys and values are not cloned.

Example

   Hashtable hashTable1 = new Hashtable();
   Hashtable hashTable2 = new Hashtable();
   hashTable1.put("2", "a");

   Logger.log("hashTable: " + hashTable1.get("2"));
   Logger.log("hashTable: " + hashTable2.get("2"));
   hashTable2 = (Hashtable)hashTable1.clone();
   Logger.log("hashTable: " + hashTable1.get("2"));
   Logger.log("hashTable: " + hashTable2.get("2"));

The example above creates two hashtables and clones one. Afterwards, the result is written to the logger.