Skip to content
Advertisement

What is the right printf syntax when formatting a double? [closed]

I’m stuck at the printf statement. Can anyone tell, what’s the right syntax for printf when formatting a double?

JavaScript

Advertisement

Answer

These are the System.out.printf() format rules:

JavaScript

You can find plenty of examples and explanation of printf() here and here

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement