Re: unchecked or unsafe operations??
- From: "Bart Cremers" <bcremers@xxxxxxxxx>
- Date: 21 Dec 2005 23:33:14 -0800
Well, maybe I shouldn't have put Object in the example, I still believe
it's better to put <Object> then to put nothing, IF, and only if,
you're sure anything can be put in the collection.
It's not a case of getting rid of the compiler warnings, but a way to
show you've thought about the possible types in the collection and
Object is the only good solution.
For the given example, Drawable or Animal are probably the best
matches, but from the given code I could not be 100% sure, so I gave
Object as example.
Regards,
Bart
.
- Follow-Ups:
- Re: unchecked or unsafe operations??
- From: Oliver Wong
- Re: unchecked or unsafe operations??
- References:
- unchecked or unsafe operations??
- From: Jonie
- Re: unchecked or unsafe operations??
- From: Bart Cremers
- Re: unchecked or unsafe operations??
- From: Oliver Wong
- unchecked or unsafe operations??
- Prev by Date: Re: Reading contents of a folder
- Next by Date: Re: abstract... NetworkDrawable
- Previous by thread: Re: unchecked or unsafe operations??
- Next by thread: Re: unchecked or unsafe operations??
- Index(es):
Relevant Pages
|