The following is the code snippet:
int[] cdb1 = {2,1,1,5,5};
int[] cbd2 = {3,1,1,2,2,6,6};
int[] cbd3 = {3,2,2,3,3,7,7};
int[] cbd4 = {2,3,3,4,4};
int[] cbd5 = {4,4,4,5,5,6,6,7,7};
String this_cdb = "cdb"+Integer.toString(router_id);
int this_cbd_number = this_cdb[0];
I get the following error: array required, but String found
int this_cbd_number = this_cdb[0];
here router_id can be 1 2 3 4 or 5. I know I declared this_cdb as String. But how do I reference it to the right array name?