How do I get whole and fractional parts from double in JSP/Java ? If the value is 3.25 then I want to get fractional =.25, whole = 3
fractional =.25
whole = 3
How can we do this in Java?
double value = 3.25; double fractionalPart = value % 1; double integralPart = value - fractionalPart;
1.4m articles
1.4m replys
5 comments
57.0k users