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
🔒Открыть пост
и посмотреть медиа
🤔 Для чего нужен функциональный интерфейс BiConsumer? BiConsumer — это функциональный интерфейс из пакета java.util.function, который принимает два входных аргумента и не возвращает результат. Сигнатура BiConsumer @FunctionalInterface public interface BiConsumer { void accept(T t, U u); } 🚩Вывод пар значений Допустим, у нас есть Map, и мы хотим вывести все ключи и значения: import java.util.Map; import java.util.function.BiConsumer; public class BiConsumerExample { public static void main(String[] args) { Map map = Map.of("Alice", 30, "Bob", 25, "Charlie", 35); // Используем BiConsumer для вывода ключа и значения BiConsumer printEntry = (key, value) -> System.out.println("Имя: " + key + ", возраст: " + value); // Применяем BiConsumer к каждому элементу Map map.forEach(printEntry); } } Вывод Имя: Alice, возраст: 30 Имя: Bob, возраст: 25 Имя: Charlie, возраст: 35 🚩Использование `BiConsumer` в `Stream` Допустим, у нас есть список продуктов и их цены. Мы хотим увеличить цену каждого товара и напечатать результат. import java.util.*; import java.util.function.BiConsumer; public class BiConsumerStreamExample { public static void main(String[] args) { Map products = new HashMap(); products.put("Хлеб", 50.0); products.put("Молоко", 80.0); products.put("Яблоки", 120.0); // BiConsumer, который увеличивает цену и выводит её BiConsumer increaseAndPrint = (name, price) -> { double newPrice = price * 1.1; // +10% System.out.println(name + " теперь стоит " + newPrice); }; products.forEach(increaseAndPrint); } } Вывод Хлеб теперь стоит 55.0 Молоко теперь стоит 88.0 Яблоки теперь стоят 132.0 🚩Объединение `BiConsumer` с `andThen()` Метод andThen(BiConsumer) позволяет объединять несколько действий в цепочку. import java.util.function.BiConsumer; public class BiConsumerChaining { public static void main(String[] args) { BiConsumer printUser = (name, age) -> System.out.println("Пользователь: " + name + ", возраст: " + age); BiConsumer checkAdult = (name, age) -> System.out.println(name + (age >= 18 ? " совершеннолетний" : " несовершеннолетний")); // Объединяем два BiConsumer'а BiConsumer combined = printUser.andThen(checkAdult); combined.accept("Алексей", 20); combined.accept("Мария", 16); } } Вывод: Пользователь: Алексей, возраст: 20 Алексей совершеннолетний Пользователь: Мария, возраст: 16 Мария несовершеннолетний Ставь 👍 и забирай 📚 Базу знаний
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