Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Friends ,
I have below code in tjavarow written and it throws error at new ArrayList which works fine in eclipse ...
my requirement is to create json structure with in java for each array element and put it in to an json array structure.
String str = input_row.Lang_Str;
String[] array = str.split("\"\"");
//String[] output = new String[array.length];
List<String> output = new ArrayList<String>();
for(int i=0; i<array.length; i++) {
String sqlString = "languageTypeCd:"+array[i]+",providerSpeaksInd:null";
output.add(sqlString);
}
String finalString = "";
for (String string : output) {
if(finalString.equals("")) {
finalString = finalString + string;
}
else {
finalString = finalString +","+ string;
}
}
System.out.println(finalString);
output_row.Len = input_row.Len;
output_row.Lang_Str = finalString;
hey uzix thanks for the reply , this issue got resloved .
the import was available but some how it was not working ...
java.util.List<String> output = new java.util.ArrayList<String>(); in the code which worked fine for me 🙂 .
hello,
in tjavarow , you have declared the import ?
->tjavarow > advanced settings
import java.util.ArrayList;
hey uzix thanks for the reply , this issue got resloved .
the import was available but some how it was not working ...
java.util.List<String> output = new java.util.ArrayList<String>(); in the code which worked fine for me 🙂 .