Question: how can I possibly add a value to a 2 dimensional dynamic arrays?

```
String emp[][] = {
{"001","Superman","Manda","123-1233","02-14-1970","Male","Manager","20,000","Regular"},
{"002","Batman","Manda","33-1233","07-14-2007","Male","Clerk","20,000","Regular"},
};

```

I try this code

```
int arrLen = emp.lenght;
emp[arrLen][0] = "003"
emp[arrLen][1] = "Superwoman"
emp[arrLen][2] = "QC"
emp[arrLen][3] = "123-1233"
emp[arrLen][4] = "03-12-2012"
emp[arrLen][5] = "Female"
emp[arrLen][6] = "Supervisor"
emp[arrLen][7] = "10,000"
emp[arrLen][8] = "Regular"

```

but it doesnt work

can anyone help me?

thanks

Answer: 
You can't *add* to an array - after creation, the size is fixed. You should consider using a [`List<E>`](http://docs.oracle.com/javase/7/docs/api/java/util/List.html) implementation such as [ArrayList](http://docs.oracle.com/javase/7/docs/api/java/util/ArrayList.html)... ideally having created a type to encapsulate this information better than just an array of strings. It looks like you've got dates, names, numeric values etc in there - why not *use* that information?

For example:

```
List<Person> people = new ArrayList<Person>();
people.add(new Person(1, "Superman", "Manda", new TelephoneNumber("123-1233"),
           new LocalDate(1970, 14, 2), Gender.MALE,
           "Manager", 20000, SalaryType.REGULAR);

```
You have two big issues with your current code.

1) Arrays aren't dynamic, and have fixed size. You should instead use the ArrayLists data structure, where you can add values.

2) Your array.Length returns some length n, but your array is indexed from 0 to (n-1). Hence, referencing to the length, will give you an index out of bounds exception.