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
Java arrays have fixed length. If you want resizable array use ArrayList.
Example: