Как можно заполнить ArrayList сразу значениями? Например если бы был обычный тип данных, то с помощью Collections.addAll(...). По заданию надо заполнить переменные value1 и value2 так: value1 = (a, 1, 0) value2 = (b, 0, 1)
public static ArrayList<BigInteger> Euclid(BigInteger a, BigInteger b) {
if(a.compareTo(b) > 0) {
ArrayList<BigInteger> value1 = new ArrayList<BigInteger>();
ArrayList<BigInteger> value2 = new ArrayList<BigInteger>();
}
}
Как это можно сделать, 6 раз не вызывая value1.add()