File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes problem with model compilation Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "problem with model compilation" Watch "problem with model compilation" New topic

problem with model compilation

sree dhar

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();
brands.add("jack amber");
brands.add("jail plae ale");

compiling the above programs gives the following errors uses unsafe or unchecked operations
recompile with -Xlint:unchecked for details

i am using windows xp.
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 60759

"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.

JavaRanch Sheriff

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 60759

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.
I agree. Here's the link:
subject: problem with model compilation
Similar Threads
compiling this java program
what problem is this???
Unchecked Exception( -Xlint)
Package problems
package help