MathTestMain.java 548 B

123456789101112131415161718192021222324252627
  1. package com.huimv.apiservice;
  2. /**
  3. * main for test
  4. *
  5. * @author yinhao
  6. */
  7. public class MathTestMain {
  8. public static void main(String[] args) {
  9. System.out.println(System.currentTimeMillis());
  10. System.out.println(1000000000 * 3);
  11. // int i = Math.multiplyExact(1000000000, 3);
  12. // System.out.println(i);
  13. float f = 123456789;
  14. System.out.println(f);
  15. long round = Math.round(123.49);
  16. System.out.println(round);
  17. System.out.println(String.format("%.2f", 123.5549));
  18. }
  19. }