Java学习第二章_图文.pptVIP

  • 45
  • 0
  • 约 62页
  • 2016-11-01 发布于广东
  • 举报
* Common Pitfall 1: Redundant Input Objects Scanner input = new Scanner(System.in); System.out.print(Enter an integer: ); int v1 = input.nextInt(); ? Scanner input1 = new Scanner(System.in); System.out.print(Enter a double value: ); double v2 = input1.nextDouble(); * double vs. float The double type values are more accurate than the float type values. For example, System.out.println(1.0 / 3.0 is + 1.0 / 3.0); System.out.println(1.0F / 3.0F is + 1.0F / 3.0F); * Scientific Notation Floating-point literals can also be specified in scientific notation, for example, 1.23456e+2, same as 1.23456e

文档评论(0)

1亿VIP精品文档

相关文档