StringBuffer sb = new StringBuffer();
ExecutorService executor = Executors.newFixedThreadPool (10);
for (String p:pCall) { Runnable runner -> {
fProc="{call "+p+")"; csProcCall = con.prepareCall (fProc); csProcCall.registerOut Parameter (1,OracleTypes.VARCHAR) ;
csProcCall.executeQuery (); String errorMsg = (String) csProcCall.getObject(1);
Common.log(errorMsg);
if (!errorMsg.equals IgnoreCase ("SUCCESS")) { errorMessage=errorMessage+errorMsg;
}
System.out.println("parallel procedure execution" + p);
executor.execute (runner) ;
sb.append("Started the procedure" + p);
}
executor.shutdown();
while (!executor.isTerminated()) {
}
Please help me out to convert the if statement block to string buffer to run the code successfully