Re: Method chaining with generics
- From: "Chris Uppal" <chris.uppal@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 31 Aug 2005 11:47:43 +0100
Raymond DeCampo wrote:
> Is there any case
> when casting a List to List<Object> would cause a problem?
I haven't been following the thread, so this may be irrelevant. But if you
start with a List that is intended to hold Strings (whether it's declared as a
List or a List<String> doesn't matter provided it reaches your code as a List)
and cast that to a List<Object>, then you'll be able to add a Rectangle to it,
which would not be correct.
-- chris
.
- Follow-Ups:
- Re: Method chaining with generics
- From: Hemal Pandya
- Re: Method chaining with generics
- References:
- Method chaining with generics
- From: iksrazal
- Re: Method chaining with generics
- From: Hemal Pandya
- Re: Method chaining with generics
- From: Oliver Wong
- Re: Method chaining with generics
- From: Raymond DeCampo
- Method chaining with generics
- Prev by Date: Re: Tomcat, Precompile JSP Pages
- Next by Date: Re: Method chaining with generics
- Previous by thread: Re: Method chaining with generics
- Next by thread: Re: Method chaining with generics
- Index(es):
Relevant Pages
|