Logo
TGCATALOG
Catalog Collections Blog
Java | Interview questions

Java | Interview questions

Questions and answers for Java developer interviews.

No ratings
324
01.12.2026
324
01.12.2026
No ratings
324
01.12.2026
Safe redirect via bot
О канале

Questions and answers for Java developer interviews.

Подписчиков —
Тематика Technology
Ссылка @easy_java_ru

We also recommend

Kekaton AI | Voiceover and voice clone
Kekaton AI | Voiceover and voice clone
Bot

AI bot for text-to-speech and voice cloning in Telegram. Create audio using neural network quickly and easily.

Description

Selection of typical questions in Java interviews: from JVM basics to Spring and Hibernate. Each question with detailed explanation, code examples, and tips. Suitable for all levels.

Latest posts

Java | Interview questions
Java | Interview questions
🔒Открыть пост
и посмотреть медиа
🤔 Что знаешь про поверхностное копирование? Поверхностное копирование (Shallow Copy) – это процесс создания нового объекта, который содержит ссылки на те же вложенные объекты, что и оригинал. 🟠Как сделать поверхностное копирование в Java? Способ 1: Метод clone() (реализация Cloneable) class Person implements Cloneable { String name; public Person(String name) { this.name = name; } @Override protected Object clone() throws CloneNotSupportedException { return super.clone(); // Поверхностное копирование } } public class Main { public static void main(String[] args) throws CloneNotSupportedException { Person original = new Person("Иван"); Person copy = (Person) original.clone(); System.out.println(copy.name); // Иван } } 🟠Проблема с вложенными объектами (общие ссылки) Если объект содержит вложенные объекты, они не копируются, а передаются по ссылке. class Address { String city; public Address(String city) { this.city = city; } } class User implements Cloneable { String name; Address address; public User(String name, Address address) { this.name = name; this.address = address; } @Override protected Object clone() throws CloneNotSupportedException { return super.clone(); // Поверхностное копирование } } public class Main { public static void main(String[] args) throws CloneNotSupportedException { Address address = new Address("Москва"); User original = new User("Иван", address); User copy = (User) original.clone(); copy.address.city = "Санкт-Петербург"; // Меняем адрес у копии System.out.println(original.address.city); // Санкт-Петербург (изменилось и у оригинала!) } } 🟠Как сделать глубокую копию? (Deep Copy) Решение: Создать новый вложенный объект в clone() @Override protected Object clone() throws CloneNotSupportedException { User clonedUser = (User) super.clone(); clonedUser.address = new Address(this.address.city); // Копируем вложенный объект return clonedUser; } Ставь 👍 и забирай 📚 Базу знаний
Java | Interview questions
FAQ

Open Java | Interview questions in Telegram and press the Start button. No separate registration is required.

Yes. The service is designed to be straightforward: open the resource, follow the on-screen instructions and start using it.

No. You can use Java | Interview questions directly in Telegram unless the resource description says otherwise.

Access depends on the resource. Check the current information in Telegram after opening Java | Interview questions.

The exact features depend on the resource. Open Java | Interview questions to see its current functions, content and access conditions.

Reviews for channel Java | Interview questions

Log in to leave a review

Only registered users can share their opinion.

No reviews yet

Be the first to share your impression of this resource!

Similar resources

Loading
Switch to Light Theme
Home Catalog Collections Blog Login