Sobes.tech

How to filter even numbers from a large collection using Stream API, convert them into objects, and return any one element?

175

How to implement pagination in an API? The OFFSET problem in PostgreSQL and alternatives (cursor-based pagination)?

172

Write an SQL query: how many employees are in each department (table employee with columns: employee ID, name, age, department)?

164

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?

153

What is a Consumer Group in Kafka? When is it not necessary to combine two consumers into one group?

151

How to modify the method signature to accept List<Integer>, List<Long>, List<Double> (all inheritors of Number)?

150

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?

146

Modify SQL: only employees over 30 years old. Then: only departments with more than 100 employees.

138

How does CAS work inside AtomicInteger? What happens if the value changes between reading and writing? When does AtomicInteger perform poorly under high contention?

130

Is it possible to pass a List<Integer> to a public method that accepts a Collection interface?

114