You can't remove the warning other than by compiler settings. Take comfort in the fact that if you compile the JDK source, you'll get many more warning. Generics is a shoehorned fit
when do you write "unchecked" warnings ? Could you please list out few examples ?
I think , this keyword is more appropriate for Exceptions where "checked" is for predefined exceptions. e.g SQLException when you trying to connect to DB .
And "unchecked" is for Exceptions which can not be predicted at compile time . That is for run time. ..e.g RuntimeException.
Here you are using in the context of warnings ...thats the reason I'm worried.
when do you write "unchecked" warnings ?
Mick Barry
Thats what I mentioned above about telling the compiler to ignore those warnings
Not a good idea imo to be hiding warnings
unchecked is referring to the unchecked cast that it is warning you about.
Open in new window