Hi, I want to use an ArrayList of long but

ArrayList<long>liste = new ArrayList<long>();

doesnt work. Eclipse changes it to

ArrayList<long[]>liste = new ArrayList<long[]>();

. What to do? I really need an arraylist of long values. Thanks.

Recommended Answers

All 2 Replies

You need ArrayList<Long>. Long is the wrapper class for the primitive long. Autoboxing will convert your long values to Long for you when you add them to the ArrayList.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.