A beginner questions about printf, java

Actually printf is used in java if you are using formatting as he was asking about in his question.

double number = 10.5555555;
System.out.printf("The number 10.555555 rounded to two decimal places is %2f", number);

Now as far as the symbols, the ones I know are %d = integer, %f= double, %s= string.

Browse More Popular Posts

Leave a Comment