fork download
  1. import java.math.*;
  2.  
  3. class Test
  4. {
  5. public static void main (String[] args) throws java.lang.Exception
  6. {
  7. double d = 1.2347;
  8. BigDecimal dd = new BigDecimal(d);
  9. System.out.println(dd);
  10. }
  11. }
Success #stdin #stdout 0.07s 380224KB
stdin
Standard input is empty
stdout
1.2346999999999999086952584548271261155605316162109375