What are aspects in Spring AOP? What are they used for? Provide examples.
Java
Tell me about your last place of work. What did you do, and what was the technical stack?
What is Spring context (ApplicationContext)?
What happens if the Spring context crashes during deployment in Kubernetes?
Tell about the development process (Agile/Scrum). How are tasks estimated?
Integer i = 300, j = 300; System.out.println(i == j);
How independently did you design solutions at work?
What is a bean in Spring?
What is a volatile variable and what is it used for?
How can a thread indicate that it can be interrupted so that another thread can execute?
How does @Transactional work? What happens when a transactional method is called from within the same class?
What are liveness and readiness probes in Kubernetes? How do they differ?
How to create a transaction manually without the @Transactional annotation?
Tell me about the Circuit Breaker you implemented for integration with an external system.
How to construct dynamic queries when filter conditions are unknown in advance (e.g., 10 optional fields)?
Can you give a similar example with another type where '==' will give false?
How do you work with databases? Hibernate/JPA — how do you use it?
Input: nums = [0,1,2,4,5,7] Output: ["0->2","4->5","7"] public class DemoApplication { public static void main(String[] args) { int[] nums = {0,1,2,4,6,5,7,10}; System.out.println(summary(nums)); } public static List<String> summary(int[] nums){ List<String> result = new ArrayList<>(); int i = 0; int n = nums.length; while (i < n) { int start = nums[i]; while (i + 1 < n && nums[i+1] == nums[i] + 1){ i++; } int end = nums[i]; if (start == end){ result.add(String.valueOf(start)); } else { result.add(start + "->" + end); } i++; } return result; } }