Is there a simple way in Java to format a decimal, float, double, etc to ONLY print the decimal portion of the number? I do not need the integer portion, even/especially if
This will print 0.3
double x = 23.8; int y =(int)x; float z= (float) (x % y); System.out.println(z);