Can you use int in ArrayList Java?
Can you use int in ArrayList Java? ArrayList or any other collection cannot store primitive data types such as int. Can we store int in ArrayList? An ArrayList cannot store ints. To place ints in ArrayList, we must convert them to Integers. This can be done in the add() method Read more…