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
```

最新文章

  1. Unable to extract 64-bitimage. Run Process Explorer from a writeable directory
  2. 【转】我是如何在SQLServer中处理每天四亿三千万记录的
  3. java连接sql server2005
  4. ubuntu 14 配置 tomcat
  5. 什么是 IntentService
  6. Java虚拟机(JVM)中的内存设置详解
  7. free 命令解释
  8. 第一个shell编程,输出hello world!
  9. 2015年6月股灾永远载入A股史册
  10. FZU 2144 Shooting Game(数学+贪心)
  11. jvm 线程实现机制
  12. linq转载
  13. 使用缓存方式优化递归函数与lru_cache
  14. 【python】安装pymongo时出错
  15. ucore-lab1-练习4report
  16. Silverlight中Image控件Stretch属性的四种值比较
  17. iOS设计模式-原型模式
  18. 阿里八八Alpha阶段Scrum(9/12)
  19. imperva—waf 敏感字段显现
  20. Unity3d + PureMVC框架搭建

热门文章

  1. Generative Adversarial Networks overview(4)
  2. (4)给树莓派安装中文输入法Fcitx及Google拼音输入法
  3. Frightful Formula Gym - 101480F (待定系数法)
  4. kuma 学习二 centos 安装
  5. 常用方法 DataTable转换为Html
  6. Linux禁止ping和开启ping的方法
  7. Nginx目录文件列表显示
  8. jmeter-可视化的非GUI模式
  9. C# 序列化与反序列化Serialization之Json Xml Binary Soap JavaScript序列化
  10. vue路由的异步加载(懒加载)方法