Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Wrox Announcements and Feedback > All Other Wrox Books
Password Reminder
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
All Other Wrox Books Do you have a question about a Wrox book that isn't listed anywhere on p2p.wrox.com or where the forum is locked? Here's a forum to post questions about any other Wrox book so that other readers or one of the authors can help you with your questions. IF YOU ARE LOOKING FOR CODE DO NOT ASK "Where can I find the code for this book?" That question is answered here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the All Other Wrox Books section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Closed Thread
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old January 31st, 2005, 04:12 PM
Registered User
Join Date: Jan 2005
Location: , , Spain.
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Beginning JSP Web Development - Ch08

Hello Everybody!
First, I'm really sorry but my English is not so good.
Well, I have two classes, User.java and ArrayListDemo.java, when I compile the second class (after compile the first class perfectly)I get this warning:

warning: [unchecked] unchecked call to add(E) as a member of the raw type java.util.ArrayList

What's the problem? Why can't I add my object usr3?
Can Anyone help me? Thanks!!!

package com.wrox.utilities;

public class User {

       private String username;
       private String phonenumber;

       public String getUsername() {
              return username;

       public void setUsername(String uname) {
              this.username = uname;

       public String getPhonenumber() {
              return phonenumber;

       public void setPhonenumber(String pnumber) {
              this.phonenumber = pnumber;

       public User(){

       public User(String uname, String pnumber){
              this.username = uname;
              this.phonenumber = pnumber;


package com.wrox.utilities;
import java.util.ArrayList;

public class ArrayListDemo {
       /* método estatico MAIN */

       public static void main(String[] args) {

         User usr1 = new User("J Smith", "123-444-4444");
         User usr2 = new User("M Walker", "123-555-5555");
         User usr3 = new User("R Johnson", "123-666-6666");

         ArrayList userlist = new ArrayList();

         System.out.println("USERS LIST:");

         for (int i=0; i<userlist.size(); i++){
            User usr = (User) userlist.get(i);
            System.out.println("User name: " + usr.getUsername());
            System.out.println("Phone Number: " + usr.getPhonenumber());


Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Help me! about "beginning JSP Web Development" ddgfei JSP Basics 7 May 13th, 2006 12:52 PM
Next levet after "Beginning JSP Web Development" nolas JSP Basics 0 September 29th, 2005 04:58 AM
Beginning JSP Web Development Book - Struts questi gstoyanoff JSP Basics 2 February 25th, 2004 02:21 PM
Who have the code of Beginning jsp web development Robertzang JSP Basics 2 September 5th, 2003 03:49 AM

All times are GMT -4. The time now is 11:29 AM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.