How do you create an array of any size(no limits).

Advertisement
how do you create an array of any size(no limits). this array should hold BigInteger values.
BigInteger[] array = new BigInteger[100000000]; //creates new array of BigIntegers array[0] = new BigInteger("6"); //puts "6" in
array[1] = BigInteger.ZERO;
but this type of an array can only hold a limited amount.
Advertisement

Replay

Use a java.util.List, e.g., ArrayList or LinkedList.