personnel

  float x = 302.01f;  
  System.out.println(x == 302.01); //false
  System.out.println(x == 302.01f); //true
  
  double y = 302.01;
  System.out.println(y == 302.01); //true
  System.out.println(y == 302.01f); //false
  
  float z = 302.00f;
  System.out.println(z == 302); //true
  System.out.println(z == 302f); //true
  
  double j = 302;
  System.out.println(j == 302); //true
  System.out.println(j == 302f); //true

分类:

技术点:

相关文章:

  • 2022-12-23
  • 2021-07-18
  • 2022-12-23
  • 2022-02-24
  • 2022-02-04
  • 2022-01-31
  • 2022-02-02
猜你喜欢
  • 2022-01-24
  • 2022-12-23
  • 2021-05-25
  • 2021-12-25
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案