Arraylist problem

Posted on 2008-11-12
Last Modified: 2012-05-05
Hi all,

I have changed code in my project around and am now getting an annoying error. In one class (which i copied exactly) i am unable to use the ARRAYLISt.add(intVARIABLE) method.

public void setPlayer1Sets(int player1Sets) {

the code is exactly the same in both projects but one only throws a warning whereas the new one throws a 'The method add(int, Object) in the type ArrayList is not applicable for the arguments (int)' error

Question by:billyleo
    LVL 86

    Accepted Solution

    One of your projects, i.e. the one that's not working, is using < Java 1.5

    Author Closing Comment

    perfect - i noticed that the minute i clicked post - thanks
    LVL 86

    Expert Comment


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    What Is Threat Intelligence?

    Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

    After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
    Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
    Video by: Michael
    Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
    This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now