What is Springboot, how Dependency injection works in Springboot
What are benefits of using Springboot.
What are records in Java
How to achieve Immutability
What is Lazy Loading in Hibernate
Springboot controller, and all different annotations for springboot and its usage.
Coding Question
customer class has two fields, 1. customerId and list of subscription provided for different product, find the most popular productId
class Customer {
private Integer customerId;
private List subscriptions;
Input give below write method to find most popular productId which has most subscription by across all customers.
List customer = new Arrays.asList(
new Customer(1, List.of(11,13,15,16,17),
new Customer(1, List.of(12,14,17,)),
new Customer(1, List.of(13,11,16)),
new Customer(1, List.of(11,13,17)),
new Customer(1, List.of(12,23,13))
)
find Integer getMostPopularProductId(List customer)