Since []
is an operator and java does not support operator overloading you can't use it with List. Instead you have to use the set(int index, T value)
and get(int index)
methods, which may be verbose but provide exact the same functionality.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…