Re: How to create array of hash table with correct types
- From: Roedy Green <see_website@xxxxxxxxxxxxxxxxxxxx>
- Date: Fri, 04 Jul 2008 00:15:15 GMT
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
.
- Follow-Ups:
- References:
- How to create array of hash table with correct types
- From: jonbbbb
- How to create array of hash table with correct types
- Prev by Date: How to create array of hash table with correct types
- Next by Date: Re: display a TableModel as a JTable
- Previous by thread: How to create array of hash table with correct types
- Next by thread: Re: How to create array of hash table with correct types
- Index(es):