How to filter even numbers from a large collection using Stream API, convert them into objects, and return any one element?
Java
How to implement pagination in an API? The OFFSET problem in PostgreSQL and alternatives (cursor-based pagination)?
Write an SQL query: how many employees are in each department (table employee with columns: employee ID, name, age, department)?
What is AtomicInteger, what is it used for, and what are its advantages?
Will there be a performance issue when using Stream API with filter, map, and findAny on a collection of a million elements if only one object is needed?
What is a Consumer Group in Kafka? When is it not necessary to combine two consumers into one group?
How to modify the method signature to accept List<Integer>, List<Long>, List<Double> (all inheritors of Number)?
The method with @Transactional throws IllegalStateException — the transaction is rolled back, although the data should be saved. What is the problem and how to fix it?
Modify SQL: only employees over 30 years old. Then: only departments with more than 100 employees.
What is the @Conditional annotation in Spring and what is it used for?
How does CAS work inside AtomicInteger? What happens if the value changes between reading and writing? When does AtomicInteger perform poorly under high contention?
Is it possible to pass a List<Integer> to a public method that accepts a Collection interface?