how to check precision and length of a long ??
Posted on 2003-11-11
I have a long data type. Along with it I have the maximum allowed length and the maximum allowed precision for the field. I want to check if the given number is within the required specifications.
boolean result = checkPrecision(longNumber, length, precision);
for example for length 4 and precision 2 the maximum value allowed is 99.99 ...
I want to make a generic method to which i can pass the length and precision and get the maximum allowed range ..
Can you help me out.