Spring Boot Annotations Explained: What Interviewers Expect You to Know
From @SpringBootApplication to @Transactional — the annotations you use every day, and how to explain them clearly in an interview.
Sample article
Java
Streams appear in almost every Java interview. Here are common Stream API questions with clear explanations and code you can practise.
The Stream API, introduced in Java 8, lets you process collections in a declarative way. Interviewers use it to check whether you write modern Java and whether you understand what happens behind the method chain.
Intermediate operations such as map, filter and sorted return a new stream and are lazy — nothing runs until a terminal operation is called. Terminal operations such as collect, forEach, count and reduce trigger processing and produce a result or side effect.
Map<Character, Long> freq = "programming".chars()
.mapToObj(c -> (char) c)
.collect(Collectors.groupingBy(
Function.identity(),
LinkedHashMap::new,
Collectors.counting()));
// {p=1, r=2, o=1, g=2, a=1, m=2, i=1, n=1}Optional<Integer> second = numbers.stream()
.distinct()
.sorted(Comparator.reverseOrder())
.skip(1)
.findFirst();map transforms each element into exactly one element. flatMap transforms each element into a stream and then flattens all those streams into one — useful for a List<List<String>> or for splitting sentences into words.
Map<String, List<Employee>> byDept = employees.stream()
.collect(Collectors.groupingBy(Employee::getDepartment));
Map<String, Double> avgSalary = employees.stream()
.collect(Collectors.groupingBy(
Employee::getDepartment,
Collectors.averagingDouble(Employee::getSalary)));findFirst returns the first element in encounter order. findAny may return any element and can be faster in parallel streams because it does not need to respect order.
No. Once a terminal operation has run, the stream is consumed. Calling another operation throws IllegalStateException. Create a new stream from the source, or use a Supplier<Stream<T>> if you need to build it repeatedly.
Practise writing each example without an IDE, then explain it aloud. Being able to describe what each step does is what turns a correct answer into a strong one.
This is a sample article published as a starter resource. Verify technical details against official documentation for the versions you use.
From @SpringBootApplication to @Transactional — the annotations you use every day, and how to explain them clearly in an interview.
Sample article
Joins, GROUP BY, the classic “second highest salary” and window functions — practise these SQL questions before your next interview.
Sample article
Signals changed how Angular handles state and change detection. Learn signal, computed and effect with simple examples.
Sample article
Prepare. Perform. Progress.
Our team can help you prepare, solve doubts and practise interviews around what you are learning.