- 1、本文档共14页,可阅读全部内容。
- 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
Java面试题和答案(英文版)Java面试题和答案(英文版)
Java面试题和答案(英文版) Q: What is the difference between an Interface and an Abstract class? A: An abstract class can have instance methods that implement a default behavior. An Interface can only declare constants and instance methods, but cannot implement default behavior and all methods are implicitly abstract. An interface has all public members and no implementation. An abstract class is a class which may have the usual flavors of class members (private, protected, etc.), but has some abstract methods.Q: What is the purpose of garbage collection in Java, and when is it used?A: The purpose of garbage collection is to identify and discard objects that are no longer needed by a program so that their resources can be reclaimed and reused. A Java object is subject to garbage collection when it becomes unreachable to the program in which it is used. Q: Describe synchronization in respect to multithreading.A: With respect to multithreading, synchronization is the capability to control the access of multiple threads to shared resources. Without synchonization, it is possible for one thread to modify a shared variable while another thread is in the process of using or updating same shared variable. This usually leads to significant errors. Q: Explain different way of using thread? A: The thread could be implemented by using runnable interface or by inheriting from the Thread class. The former is more advantageous, cause when you are going for multiple inheritance..the only interface can help. Q: What are pass by reference and passby value? A: Pass By Reference means the passing the address itself rather than passing the value. Passby Value means passing a copy of the value to be passed. Q: What is HashMap and Map?A: Map is Interface and Hashmap is class that implements that. Q: Difference between HashMap and HashTable?A: The HashMap class is roughly equivalent to Hashtable, except that it is unsynchronized and permits nulls. (HashMap allows null values as ke
您可能关注的文档
- Innovation management process (创新管理流程).docx
- Innovation network.doc
- INSTITUTE CARGO CLAUSES(ICC2009)(C).doc
- Institutes.docx
- Insulation testing method.doc
- INSURANCE.docx
- Intel招聘实习生.doc
- Integration of multiple platforms for real-time remote model-based condition monitoring翻译.doc
- Intensive Reading —5. Science and Technology.doc
- Intercultural Communication in English.doc
文档评论(0)