| Author |
problem with model compilation
|
sree dhar
Greenhorn
Joined: Mar 04, 2007
Posts: 4
|
|
this program is taken from Head First servlets and jsp on page #82. package com.example.model; import java.util.*; public class beerexpert{ public List getBrands(String color) { List brands=new ArrayList(); if(color.equals("amber")) { brands.add("jack amber"); brands.add("redmoose"); } else { brands.add("jail plae ale"); brands.add("piss"); } return(brands); } } compiling the above programs gives the following errors beerexpert.java uses unsafe or unchecked operations recompile with -Xlint:unchecked for details i am using windows xp.
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56224
|
|
"sreedharreddy sreedharreddy", There aren't many rules that you need to worry about here on the Ranch, but one that we take very seriously regards the use of proper names. Please take a look at the JavaRanch Naming Policy and adjust your display name to match it. In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious. Thanks! bear JavaRanch Sheriff
|
[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56224
|
|
That's not an error. It's a warning to do with the use (or lack thereof) of Java 1.5 generics. It's not a servlet issue, so this post has been moved to a more appropriate forum.
|
 |
 |
|
|
subject: problem with model compilation
|
|
|