Quantcast
Channel: Programming Forums
Viewing all articles
Browse latest Browse all 51036

Formatting

$
0
0
System.out.printf ("%2$d + %1$d, 123, 456);

output: 456+123




In my text book they say that the d after the arguments is a conversion character, why does it need a conversion character when what we have are ints? why not just leave the conversion out?

Im confused.

Viewing all articles
Browse latest Browse all 51036

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>