Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static String getDoubleFormat(double input) {
- String format = String.format("%.2f", input);
- if (format.endsWith(".00")){
- format = format.substring(0, format.length() - 3);
- }
- return format;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement