String testValue = "149";
getMaxValue(testValue);
.
.
.
private static int getMaxValue(String value) {
double maxValue = Double.parseDouble(value);
int digitNumber = value.length();
return (int) ((int) (Math.ceil(maxValue / Math.pow(10, digitNumber-1))) * Math.pow(10, digitNumber-1));
}
댓글 없음:
댓글 쓰기