/ Published in: Java
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
private boolean buildExpressionWithRestOfTheValues(int item, StringBuffer expression, int expectedTotal, ArrayList restOfValues, String operator) { boolean isPossibleWithRestOfValues = find(restOfValues, expectedTotal, newExpression); if(isPossibleWithRestOfValues){ expression.append("(").append(newExpression).append(operator).append(item).append(")"); return true; } return false; }