Re: How to create array of hash table with correct types



On Thu, 3 Jul 2008 16:38:21 -0700 (PDT), jonbbbb <jon.berg@xxxxxxxxx>
wrote, quoted or indirectly quoted someone who said :

I tried the following, which does not compile:

private Hashtable<String, NodeAddress>[] cache = {new
Hashtable<String, NodeAddress>(),new Hashtable<String,
NodeAddress>()};

private Hashtable<String, NodeAddress>[] cache = new Hashtable<String,
NodeAddress>()[3];


Create the array slots in one step, then initialise the slots in a
statement each.
--

Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com
.