1 / 11
文档名称:

Java笔试常见英语题(附答案).doc

格式:doc   大小:76KB   页数:11
下载后只包含 1 个 DOC 格式的文档,没有任何的图纸或源代码,查看文件列表

如果您已付费下载过本站文档,您可以点这里二次下载

分享

预览

Java笔试常见英语题(附答案).doc

上传人:蓝天 2021/10/17 文件大小:76 KB

下载得到文件列表

Java笔试常见英语题(附答案).doc

相关文档

文档介绍

文档介绍:QI. How could Java classes direct program messages to the system console, but error messages, say to a file?・
Java中如何将程序信息导航到系统的console,而把错误信息放入到一个file 中?
The class System has a variable out that represents the standard output, and the variable err that represents the standard error device・ By defauIt, they both point at the system console. This how the standard output could be re-directed:
Stream st 二 new Stream(new FileOutputStream(""));
System. setErr(st); System. setOut(st);
系统有一个展现标准输出的out变量,以及一个负责标准错误设置的err变量, 默认情况下这两个变量都指向系统的console,这就是标准输出如何能被改变方向 (就是改变信息的输出位置)。
Q2. What's the difference between an interface and an abstract class?抽象类和接口的区别:
A. An abstract class may contain code in method bodies, which is not allowed in an interface. With abstract classes, you have to inherit your class from it and Java does not allow multipie inheritance・ On the other hand, you can implement multipie interfaces in your class.
抽象类中可能会含有带有方法体的一般方法,而这在接口中是不允许的。用抽 象类的时候得去继承它,但是java中是不允许多继承的,相反的(另一方面),可 一对接口多实现
Q3・ Why would you use a synchronized block vs. synchronized method? 同步锁和同步方法相比较,为什么使用同步锁?
A. Synchronized blocks place locks for shorter periods than synchronized
Q4. Explain the usage of the keyword transient?解释transient
A. This keyword does not have to be de-serialized, this its data type (i
・e.
indicates that the value of this member variable serialized with the object. When the class will be variable will be initialized with a defauIt value of zero for integers)・
这个关键字显示该成员变量的值不需要和对象一同序列化,当这个对象被序列 化的时候,这个变量就会用其所属类型的默认值来初始化。(初始为变量所属类型 的默认值)
* Q5. How can you force garbage collection?如何强制垃圾回收?(就是 如何自己手动处理垃圾回收)
A. You can't force GC, but could request it by calling System. gc()・ JVM does not guarantee that GC will be started immediately.
你不能强制使用一个gc,但是可以调用System. gc()来向其发出请求,但是jvm 并不保证gc立刻被调用。
Q6. How do you know if an explicit object casting is needed?
什么时候需要强制类型转换?
A. If you assign a superclass object to a variable o

最近更新

2025年梅县幼儿园教师招教考试备考题库及答案.. 31页

2025年永修县幼儿园教师招教考试备考题库附答.. 31页

2025年江苏航空职业技术学院单招职业技能考试.. 44页

2025年沈阳化工大学马克思主义基本原理概论期.. 12页

2025年河南牧业经济学院马克思主义基本原理概.. 12页

2025年济宁职业技术学院单招职业倾向性测试题.. 45页

2025年海南艺术职业学院马克思主义基本原理概.. 12页

2025年湖南大众传媒职业技术学院马克思主义基.. 12页

2026年中医住培带教师资理论考核题库100道附答.. 39页

2026年医学微生物学习题集【典型题】 40页

2025年眉山药科职业学院马克思主义基本原理概.. 13页

2026年网络安全知识竞赛题库及参考答案【轻巧.. 39页

小学历史与文化知识竞赛题库100道及参考答案(.. 37页

新安全生产法知识竞赛试题库及完整答案 43页

2025年重庆资源与环境保护职业学院马克思主义.. 12页

2026年主管中药师考试备考题100道完整 37页

2026年中医住培带教师资理论考核题库100道含答.. 40页

2026年主管中药师考试备考题100道含答案【基础.. 38页

2026年医学微生物学习题集含答案 40页

最新全国政法队伍教育整顿知识竞赛试题库及完.. 40页

新安全生产法知识竞赛试题库含答案(考试直接.. 43页

2025年分子诊断试剂项目合作计划书 65页

第6章转让定价的税务管理(国际税收(第二版-朱.. 44页

第7章安全协议合同协议表格模板实用文档 69页

2025年长沙幼儿师范高等专科学校单招综合素质.. 45页

2025广东中山市人民政府民众街道办事处招聘合.. 49页

2025广西南宁市青秀区融媒体中心招聘2人备考题.. 44页

2025泉州市医学会招聘工作人员2人考试参考题库.. 45页

2025贵州黔东南州锦屏县选聘城市社区工作者10.. 49页

2026年c语言基础考试题库(夺分金卷) 13页