热门面试题与答案和在线测试
面向面试准备、在线测试、教程与实战练习的学习平台

通过聚焦学习路径、模拟测试和面试实战内容持续提升技能。

WithoutBook 将分主题面试题、在线练习测试、教程和对比指南整合到一个响应式学习空间中。

面试准备

Core Java 面试题与答案

Test your skills through the online practice test: Core Java Quiz Online Practice Test

问题 116. Does Java have multiple inheritance?

Java does not support multiple inheritence directly but it does thru the concept of interfaces.
We can make a class implement a number of interfaces if we want to achieve multiple inheritence type of functionality of C++.

这有帮助吗? 添加评论 查看评论
 

问题 117. What is the super class of Hashtable?

Dictionary

这有帮助吗? 添加评论 查看评论
 

问题 118. What are some alternatives to inheritance?

Delegation is an alternative to inheritance. Delegation means that you include an instance of another class as an instance variable, and forward messages to the instance. It is often safer than inheritance because it forces you to think about each message you forward, because the instance is of a known class, rather than a new class, and because it doesn't force you to accept all the methods of the super class: you can provide only the methods that really make sense. On the other hand, it makes you write more code, and it is harder to re-use (because it is not a subclass).

这有帮助吗? 添加评论 查看评论
 

问题 119. Is a class a subclass of itself?

A class is a subclass of itself.

这有帮助吗? 添加评论 查看评论
 

问题 120. How are this() and super() used with constructors?

this() is used to invoke a constructor of the same class. super() is used to invoke a superclass constructor.

这有帮助吗? 添加评论 查看评论
 

用户评价最有帮助的内容:

版权所有 © 2026,WithoutBook。