Arraylist problem

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) {
                  this.player1Sets.add(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

Thanks
billyleoAsked:
Who is Participating?
 
CEHJConnect With a Mentor Commented:
One of your projects, i.e. the one that's not working, is using < Java 1.5
0
 
billyleoAuthor Commented:
perfect - i noticed that the minute i clicked post - thanks
0
 
CEHJCommented:
:-)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.