I am trying to create an flexible list of ints in java. By flexible I mean one which its length can be changed. It cant be of type "Integer" it must be of type "int". However you cannot use an ArrayList because it does not accept primitive types. So is there any way to do this?
Why I need this is because while my program is running I need to add ints to a list where I will later convert to an array to be used in the constructor of an object.