Re: array of lists
- From: Thomas Hawtin <usenet@xxxxxxxxxxxxxxxxx>
- Date: Sun, 10 Dec 2006 14:44:56 +0000
Wesley Hall wrote:
Seems there is lots of discussion on the creation of generic arrays in
Java, but the bottom line seems to be that you cant do it in any
reasonable way.
Just don't use them. With generics there is little use for arrays of reference types. Just use a List.
If you just want to clear the compiler warning, put the following
annotation on the method that does the add..
@SuppressWarnings({"unchecked"})
That is a measure of last resort. Not something to be thrown around just to make the compiler shut up. If the compiler is making a noise, there is probably a good reason.
Tom Hawtin
.
- Follow-Ups:
- Re: array of lists
- From: Jeremy Watts
- Re: array of lists
- From: Wesley Hall
- Re: array of lists
- References:
- array of lists
- From: Jeremy Watts
- Re: array of lists
- From: Wesley Hall
- Re: array of lists
- From: Jeremy Watts
- Re: array of lists
- From: Jeremy Watts
- Re: array of lists
- From: Wesley Hall
- Re: array of lists
- From: Wesley Hall
- Re: array of lists
- From: Wesley Hall
- array of lists
- Prev by Date: Re: inputFileUpload error
- Next by Date: Distributed Java Programming Model
- Previous by thread: Re: array of lists
- Next by thread: Re: array of lists
- Index(es):
Relevant Pages
|