Java 知识测试 Java Data Types
Question 1
Predict the output of the following program.

class Test {
	public static void main(String[] args) {
		Double object = new Double("2.4");
		int a = object.intValue();
		byte b = object.byteValue();
		float c = object.floatValue();
		double d = object.doubleValue();
		System.out.println(a + b + c + d);
	}
}

A. 8
B. 8.8
C. 8.800000095367432

参考答案

``` C ```

相关文章:

  • 2021-11-08
  • 2022-02-23
  • 2022-12-23
  • 2021-10-03
  • 2022-03-07
  • 2022-01-10
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-06-19
  • 2022-02-17
  • 2021-07-28
  • 2021-06-22
  • 2021-06-03
相关资源
相似解决方案