I am wondering if we can use index to access List
For example:
List list; list[5] //blah....
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.
[]
set(int index, T value)
get(int index)