ADC With Mounir (@ADCWithMounir) header
ADC With Mounir (@ADCWithMounir) profile picture

Architect → Design → Code. The full journey of a Java engineer. YouTube https://xitter.gq/t.co/AZ4ghe5SNN GitHub https://xitter.gq/t.co/5tRtWJlH0z

Paris, Ile-de-France
Joined September 2026
The rider app team changes how routes are drawn. The pricing service has to be rebuilt, retested and redeployed. It never draws anything.
4
A lambda touches variables in three places: what it receives, what it creates, and what it borrows. The compiler has different rules for each one.
4
Movie is in the permits clause, same package, final. The compiler still rejects Content. Your fix in the replies.
1
4
The fix: public final class Movie extends Content { } Being named in permits is not enough. Every permitted class must really extend the sealed class, or javac reports an invalid permits clause on the parent.
1
This class has a method called Movie. new Movie() never runs it, and the title stays "Untitled". One word turns a constructor into a method.
3
set() returns something. Most developers guess the wrong value.
2
A List<Integer>, two calls to remove(). They don't do the same thing. Answer without running it. Answer in the replies in one hour.
1
3
71
Answer: A ([2]) remove(2) takes an int, so Java uses the index version: it removes index 2, the 7. remove(Integer.valueOf(4)) takes an object, so it removes the value 4. Only 2 is left. Full explanation on my YouTube channel.
4
Single Responsibility does not mean a class should do only one thing. It's about something else: how many reasons it has to change.
2,271
Built-in functional interfaces in Java 17: the 5 rules to know before the exam.
1
12
A sealed class, and yet any class can end up extending it. The trick is one hyphenated word.
1
31
A sealed class, a guest list, three classes trying to extend it. Answer without running it. Answer in the replies in one hour.
1
1
11
Answer: C (lines 3 and 4) Line 3: Comedy is on the list but picks no modifier. final, sealed or non-sealed is required. Line 4: non-sealed is valid, but Reality is not in the permits clause. Two rules, two broken lines. Full explanation on my YouTube channel.
6
Child classes, this and super in Java 17: the 5 rules to know before the exam.
1
23
Episodes of a season, titles in a playlist: when order matters, you need a list. Four methods do all the work by position.
1
29
How software rots, in 4 rules. And the 7 smells worth knowing by name.
1
11
Java has functional interfaces for int, long and double. For boolean, there is exactly one.
1
17
Four declarations with built-in functional interfaces. Only two compile. Pick the pair. Answer in the replies in one hour.
1
2
22
Answer: A (lines 1 and 2) 1: User::new takes nothing and returns a User. Fine. 2: isEmpty takes a String and returns a boolean. Fine. 3: x * 1.5 is a double, not an Integer. 4: Function needs two type parameters. Full explanation on my YouTube channel.
10
Open to everyone, or closed to everyone. For years those were the only two choices for a Java class. Java 17 added a third.
1
10