*i want to use nested array...can i use it java...ie.,if,i select a country i should get all states in it...How can i do this in an array..?
Printable View
*i want to use nested array...can i use it java...ie.,if,i select a country i should get all states in it...How can i do this in an array..?
Have the first dimension be the country and the second dimension be the states for that country. Something like:Code:String[][] states = new String[nbrOfCountries][];
states[0] = new String[nbrOfStates];
states[0][0] = aState;