Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Java > Java and JDK > Java Basics
Java Basics General beginning Java language questions that don't fit in one of the more specific forums. Please specify what version.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Java Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old January 12th, 2007, 03:25 PM
Registered User
Join Date: Jan 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default <identifier> expected error

public class IntegerList{
    private ArrayList<Integer> mylist = new ArrayList<Integer>();
    //private ArrayList<Integer> mylist;
    public void addElement(int newvalue){

    public void printList(){


    public int largestValue(){


    public void removeOdds(){


    public double average(){


    public int numberGreaterThan(int inputvalue){


plzz tell me what is the error
Old February 11th, 2007, 09:56 PM
Friend of Wrox
Join Date: Nov 2005
Posts: 223
Thanks: 0
Thanked 0 Times in 0 Posts


here is your error

this makes no sense
first of all what is this <Ineger>
second you can create an new array like that
its new ArrayList()
private ArrayList<Integer> mylist = new ArrayList<Integer>();
__________________________________________________ ________
I am DJ Kat...that's my name. Its a D and a J and a Kat with a K.

Similar Threads
Thread Thread Starter Forum Replies Last Post
"identifier> expected"error simmy_tj VB.NET 2002/2003 Basics 1 December 18th, 2006 08:31 AM
Identifier expected andriy JSP Basics 0 November 1st, 2006 11:28 PM
"Identifier expected" Error NehaJani VB.NET 2002/2003 Basics 6 January 23rd, 2006 11:27 PM
Identifier Expected syncmaster VB.NET 2002/2003 Basics 1 September 2nd, 2004 03:34 AM

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