Is it possible in Java to get the value of a double after the decimal point?
I want my code to produce an error message if the decimal part is 6 (like double number = 1.6, or 2.6, or 98.6). If it is not 6, I just want to print “correct”.
How do I retrieve the decimal part of the double?
1 Answer