Re: Generics error messages
- From: Roedy Green <look-on@xxxxxxxxxxxxxxxxxxxx>
- Date: Mon, 01 Aug 2005 01:12:05 GMT
On Sun, 31 Jul 2005 00:23:04 -0600, Chris Smith <cdsmith@xxxxxxx>
wrote or quoted :
> A Collection<Car>, on the other hand, may
>only contain Cars. It is an error to try to add a Truck to such a
>collection.
I did an experiment the other night and JDK 1.5 let me add a Dalmatian
to a Dog ArrayList.
I should repeat that to be doubly sure. I was expecting it to reject
the Dalmatian which would then make the <? E> <E> distinction
meaningful.
--
Bush crime family lost/embezzled $3 trillion from Pentagon.
Complicit Bush-friendly media keeps mum. Rumsfeld confesses on video.
http://www.infowars.com/articles/us/mckinney_grills_rumsfeld.htm
Canadian Mind Products, Roedy Green.
See http://mindprod.com/iraq.html photos of Bush's war crimes
.
- Follow-Ups:
- Re: Generics error messages
- From: Thomas Hawtin
- Re: Generics error messages
- References:
- Generics error messages
- From: Roedy Green
- Re: Generics error messages
- From: Chris Smith
- Generics error messages
- Prev by Date: Re: Puzzling warning message
- Next by Date: EventListenerList.remove parameters
- Previous by thread: Re: Generics error messages
- Next by thread: Re: Generics error messages
- Index(es):
Relevant Pages
|