Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package main;
- import java.text.DecimalFormat;
- public class main {
- public static void main(String[] args)
- {
- double var1=4.5;
- DecimalFormat deci = new DecimalFormat ("0.00");
- String str = deci.format(var1);
- System.out.println(str);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement