I am trying to save groups in an array string so that I can use them in separate variables if I need to. For this, I use split, but for some reason I get only the full string in the first position of the array: ultimate_array [0]. If I want to use final_array [1], I get an exception like "out of bounds". Do you know what I'm doing wrong?
String string_final = "";
String[] ultimate_array = new String[100];
String sNrFact = "";
string_final="Nrfact#$idfact1#$valfact1#$idfact2#$valfact2#$idfact3#$valfact3#$idfact4#$valfact4#$idfact5#$valfact5#$idfact6#$valfact6#$idfact7#$valfact7#$idfact8#$valfact8#$idfact9#$valfact9#$idfact10#$valfact10";
ultimate_array = string_final.split("#$");
sNrFact = ultimate_array[0];
source
share