I was having some problem when trying to split string with delimiter and store to array. So basically I have a main array with input like this:
1564095_SINGLE_true, 1564096_SINGLE_true
What I am trying to do is split the string with delimiter and store to two different array. Below as how I loop thru the main array:
String arrayA = [];
String arrayB = [];
for(int i = 0; i < selectedRecord.length; i++) {
log.debug("HEY " + selectedRecord[i]);
String tempRecord = selectedRecord[i];
}
My desired output will be:
arrayA: 1564095_SINGLE, 1564096_SINGLE
arrayB: true, true
But I have no idea on how to split it. Any ideas? Thanks!
String arrayA = []? That is not valid Java code.