You can do a few things for a Double d = 5.09876:
1. Use String.format
String formatted = String.format("%.2f", d);
System.out.println(formatted);
2. Use...
Type: Posts; User: lodenrogue
You can do a few things for a Double d = 5.09876:
1. Use String.format
String formatted = String.format("%.2f", d);
System.out.println(formatted);
2. Use...