I am new to servlets please help with the second servlet version from HF book
When I try to compile the BeerExpert.java (code in page 82) class it says Note: src\com\example\model\BeerExpert .java uses unchecked or unsafe operations Note:Recompile with -Xlint Unchecked for details.
Not sure What this means.
Joined: Sep 13, 2005
What compiler are you using, 5.0? You get those warnings when you use Lists and you don't specify types, because of the new generics in 5.0. It's nothing to worry about... they are most likely just warning you that you are inserting a raw object into a list and it wants you to parameterize it. It's no problem for the running of the application, though.
Joined: Oct 19, 2005
Thanks for the reply, Karen.
Joined: Feb 16, 2005
It shows you are using java 5.0. Read the generic topic of the java official tutorial, you will just be fine. All the same, it just a way of ensuring the right thing ends up at the right place. Say a basket of red balls will always contain red balls. For the example, guess it takes string, so you have to ensure that it is a List of Strings.
SCJA(Beta) SCJP 1.4 SCWCD 1.4 SCBCD 1.3 SCBCD 5.0 beta <br />The more practice we get, the better we are at the exams and in life in general. Pls join me at My DEN.