Самые популярные вопросы и ответы для интервью и онлайн-тесты
Образовательная платформа для подготовки к интервью, онлайн-тестов, учебных материалов и живой практики

Развивайте навыки с целевыми маршрутами обучения, пробными тестами и контентом для подготовки к интервью.

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.