debraj mallick wrote:hi Mohamed Sanaulla,
thanks for the use link, should i use this to declare an infinite 2D array.
is there any way where i can obtain value in a perticular position like we do when using simple 2D array i.e. arr[59][987].
This is not an Array. It's a Collection. What you have declared is a List that in turn holds a List capable of holding Strings.
You cannot directly query for [59][987]. First get the inner 59
th ArrayList by using get() and another get() to retrieve the 987
th String value from the inner List.
Read -
http://docs.oracle.com/javase/6/docs/api/java/util/ArrayList.html
And there is no 2D, 3D arrays in
Java. Read Stephen's reply in
this thread.