1. "printf" applied to a float using a Parameter coderanch.comHey Ritchie, thanks once again for all the help and prodding in the right direction ... here's how i finally solved the problem: public void printFloat(Rational bruch1){ int numer = bruch1.getNumer(); int denom = bruch1.getDenom(); int afterKoma = 1; double floatValue1 = (float) (numer); double floatValue2 = (float) (denom); double theFloatValue = floatValue1/floatValue2; System.out.println ("how many positions after the decimal point?"); ... |
2. Using printf with multiple strings and floats forums.oracle.com |