private void setCellColoredNumber(int x, int y, int value) { Color color = getColorByValue(value); String str = value > 0 ? "" + value : ""; setCellValueEx(x, y, color, str); } Почему в строке String str = value > 0 ? "" + value : ""; не требуется приведение числа к строке??? Я решил так: private void setCellColoredNumber (int x, int y, int value) { String s = null; if (value==0){ setCellValueEx(x,y,getColorByValue(value), s); } else s = Integer.toString(value); setCellValueEx(x,y,getColorByValue(value),s); } Есть ли у меня ошибка?