Why not declare an ArrayList if you want to hold ints?

Questions by krishna_darl   answers by krishna_darl

Showing Answers 1 - 1 of 1 Answers

Arijit Sen

  • May 24th, 2006
 

The array list always stores objects, but int is primitive data type, its not object.

If you stiil want to store int in arraylist, then you transform [wrap] it in Integer Object and then store it in arraylist.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions