Skip to content

Instantly share code, notes, and snippets.

@yoshiya54
Created December 8, 2016 22:06
Show Gist options
  • Save yoshiya54/64da1ad990126224ca74e4b0cde07c17 to your computer and use it in GitHub Desktop.
Save yoshiya54/64da1ad990126224ca74e4b0cde07c17 to your computer and use it in GitHub Desktop.
浮動小数点の表現の仕方 ref: http://qiita.com/yoshiya64/items/7269cd85e68e869915da
double f = 1.5
System.out.printf("%6.5f",f);
double f = 1.5
System.out.println(String.format("%6.5f",f));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment