views:

22

answers:

1

How can I assign value to a 2-dimensional array? My array is

String[][] arr=new String[2][3];

And when I am assigning value to this array, application is stopped.

Example: arr[0][0]="hello";

Please give me the solution...

+1  A: 

I believe your application stops due to some other reason. Simply doing

String[][] arr = new String[2][3];
arr[0][0] = "hello";

should be perfectly fine.

See

aioobe