Removes all key/value pairs from this Hashtable, leaving the size zero and the capacity unchanged. @see #isEmpty @see #size
()
| 296 | * @see #size |
| 297 | */ |
| 298 | public synchronized void clear() { |
| 299 | elementCount = 0; |
| 300 | Arrays.fill(elementData, null); |
| 301 | modCount++; |
| 302 | } |
| 303 | |
| 304 | /** |
| 305 | * Returns a new {@code Hashtable} with the same key/value pairs, capacity |