Skip to main content

English + German

English stays on the page. Click the button to show the German text under each question.

How to Answer a Backend Interview Question

Interviewers are not grading poetry. They are checking whether you own the model: what happens, what fails, and what you would do.

This page is the speaking method for every question in the bank.

Deutsch

So antwortest du in einem Backend-Interview

Interviewer bewerten keine Prosa. Sie prüfen, ob du das Modell besitzt: was passiert, was fehlschlägt, und was du tun würdest.

Diese Seite ist die Sprechmethode für jede Frage im Katalog.

The four-part answer

Aim for 60–90 seconds, then stop. Let them ask the follow-up.

1. Problem

One sentence: what goes wrong without this idea.

“Without dependency injection, services construct their own collaborators, so tests and replacements become messy and nulls show up at runtime.”

2. Mechanism

What Java or Spring actually does. Name the moving parts.

“The container creates the bean from a BeanDefinition, injects constructor arguments, and hands you a managed object — often a proxy if transactions or security apply.”

3. Trap

The failure mode they are waiting for.

“Calling this.save() inside the same class bypasses the proxy, so @Transactional does not start.”

4. Judgment

When you would use it, skip it, or design it differently.

“I keep transactions on the service layer, not on repositories, so one use case is one unit of work.”

If you only do parts 1–2, you sound junior. Part 3 is the mid-level bar. Part 4 is the senior signal.

Deutsch

Die Antwort in vier Teilen

Ziel: 60–90 Sekunden, dann Stopp. Die Nachfrage kommt von allein.

1. Problem

Ein Satz: was ohne diese Idee schiefläuft.

„Ohne Dependency Injection erzeugen Services ihre Abhängigkeiten selbst. Tests und Austausch werden umständlich, zur Laufzeit tauchen Nulls auf.“

2. Mechanismus

Was Java oder Spring wirklich tut. Die beweglichen Teile nennen.

„Der Container erzeugt den Bean aus einer BeanDefinition, injiziert Konstruktorargumente und gibt dir ein verwaltetes Objekt — oft einen Proxy, wenn Transaktionen oder Security greifen.“

3. Falle

Der Fehler, auf den sie warten.

this.save() in derselben Klasse umgeht den Proxy, deshalb startet @Transactional nicht.“

4. Urteil

Wann du es einsetzt, lässt oder anders schneidest.

„Transaktionen liegen auf der Service-Schicht, nicht auf Repositories, damit ein Use Case eine Unit of Work ist.“

Nur Teil 1–2 klingt junior. Teil 3 ist die Mid-Latte. Teil 4 ist das Senior-Signal.

What they listen for

They wantThey do not want
Cause → effectA list of annotations
One concrete exampleA blog-post dump
“This fails when…”“Spring handles it”
A trade-off“Always use X”
“I would measure / log / test …”Guessing production behavior

Forbidden filler: “basically”, “Spring magic”, “just add the annotation”.

Deutsch

Worauf sie hören

Sie wollenSie wollen nicht
Ursache → WirkungEine Liste von Annotationen
Ein konkretes BeispielEinen Blogpost
„Das bricht, wenn …“„Spring macht das schon“
Eine Abwägung„Immer X“
„Ich würde messen / loggen / testen …“Produktionsverhalten raten

Verbotener Füllstoff: „basically“, „Spring-Magie“, „einfach die Annotation setzen“.

Fachbegriffe bleiben auf Englisch, auch wenn du Deutsch sprichst: bean, proxy, persistence context, isolation, Actuator. Sie zu übersetzen klingt nicht nativer, sondern unsicherer.

Follow-ups are the real interview

The first question is a door. The next two questions decide the level.

Typical chain:

  1. “What is @Transactional?”
  2. “What happens if a runtime exception is thrown?”
  3. “What if the method is private? What if you call it from this?”
  4. “Where do you put the annotation, and why?”

Practice the chain, not only the definition.

When they say “can you go deeper?”, pick one axis:

  • Runtime — proxy, thread, persistence context
  • Failure — exception, rollback, 403, N+1
  • Design — API, consistency, test that would catch it

Deutsch

Nachfragen sind das eigentliche Interview

Die erste Frage ist eine Tür. Die nächsten zwei entscheiden das Niveau.

Typische Kette:

  1. „Was ist @Transactional?“
  2. „Was passiert bei einer RuntimeException?“
  3. „Was, wenn die Methode private ist? Was bei Aufruf über this?“
  4. „Wohin kommt die Annotation — und warum?“

Übe die Kette, nicht nur die Definition.

Wenn sie „kannst du tiefer gehen?“ sagen, nimm eine Achse:

  • Runtime — Proxy, Thread, Persistence Context
  • Fehler — Exception, Rollback, 403, N+1
  • Design — API, Konsistenz, welcher Test das fangen würde

If you do not know

Say so early, then show how you would reason.

Bad: silence, or inventing APIs.

Better:

“I have not used that in production. The way I would approach it is… I would check X in the docs / Actuator / a failing test before shipping.”

That is stronger than a wrong confident answer. Interviewers hire people who debug honestly.

Deutsch

Wenn du es nicht weißt

Früh sagen, dann zeigen, wie du denken würdest.

Schlecht: schweigen oder APIs erfinden.

Besser:

„Das habe ich so in Produktion noch nicht eingesetzt. Ich würde so rangehen: … Vor dem Shippen würde ich X in den Docs / im Actuator / in einem failing Test prüfen.“

Das ist stärker als eine falsche, selbstsichere Antwort. Eingestellt werden Leute, die ehrlich debuggen.

Whiteboard and code

For Java/Spring backend rounds you will often write or read:

  • a small service + repository
  • an entity relationship
  • a SQL query or index
  • an HTTP contract (status codes, idempotency)
  • a test (@WebMvcTest vs @SpringBootTest)

Speak while you write: “this field is the owning side, so this is where the foreign key lives.”

If they give you a bug, narrate a debug order:

  1. reproduce with a test or HTTP call
  2. check the boundary (security filter, validation, controller advice)
  3. check the proxy / transaction / persistence context
  4. check SQL / N+1 / isolation
  5. only then change code

That order is itself a senior answer.

Deutsch

Whiteboard und Code

In Java/Spring-Runden schreibst oder liest du oft:

  • einen kleinen Service + Repository
  • eine Entity-Beziehung
  • eine SQL-Query oder einen Index
  • einen HTTP-Vertrag (Statuscodes, Idempotenz)
  • einen Test (@WebMvcTest vs @SpringBootTest)

Beim Schreiben mitreden: „Dieses Feld ist die owning side, deshalb liegt hier der Foreign Key.“

Bei einem Bug eine Debug-Reihenfolge erzählen:

  1. reproduzieren (Test oder HTTP)
  2. Grenze prüfen (Security-Filter, Validierung, Controller Advice)
  3. Proxy / Transaktion / Persistence Context
  4. SQL / N+1 / Isolation
  5. erst dann Code ändern

Diese Reihenfolge ist selbst eine Senior-Antwort.

Time boxing

RoundYour job
45-minute tech screenClear Mid answers, one trap each
60–90 minute deep diveFollow-ups, a small design, a test strategy
System designAPIs, data, consistency, failure, observability — not class diagrams of Spring

If you talk past two minutes, stop: “I can go into the proxy details or into how I would test it — which is more useful?”

Deutsch

Zeit

RundeDeine Aufgabe
45-Minuten-ScreeningKlare Mid-Antworten, je eine Falle
60–90 Minuten Deep DiveNachfragen, ein kleines Design, eine Teststrategie
System DesignAPIs, Daten, Konsistenz, Fehler, Observability — keine Spring-Klassendiagramme

Sprichst du länger als zwei Minuten, stoppen: „Ich kann in die Proxy-Details oder ins Testen gehen — was ist nützlicher?“

English and German interviews

Many EU backend interviews mix languages: English for technical terms, German for team/culture.

Keep technical words in English even if the conversation is German: bean, proxy, persistence context, isolation, Actuator. Translating them on the fly sounds less fluent, not more native.

A German-shaped 20-second open:

“Das Problem ist, dass ohne eine Transaktionsgrenze zwei Writes nur halb committed werden. Spring hängt @Transactional an einen Proxy. Der Trap ist Self-Invocation: this umgeht den Proxy.”

If you want language practice, answer once in English, then once in German, using the same four parts.

Deutsch

Deutsch und Englisch

Viele EU-Runden mischen: Englisch für Technik, Deutsch für Team und Kultur.

Eine deutsche 20-Sekunden-Öffnung:

„Das Problem ist, dass ohne Transaktionsgrenze zwei Writes nur halb committed werden. Spring hängt @Transactional an einen Proxy. Der Trap ist Self-Invocation: this umgeht den Proxy.“

Zum Sprachtraining: einmal Englisch antworten, einmal Deutsch, mit denselben vier Teilen.

A 30-second template you can reuse

Fill the brackets. Do not read it like a script.

“[Concept] exists because [problem].
Spring/Java does [mechanism].
The usual trap is [trap].
In production I [judgment].”

Example:

“Bean scopes exist because not every object should live for the whole JVM.
The default is singleton: one instance per container. Prototype creates a new instance per request for that bean.
The trap is injecting a prototype into a singleton — you usually get one instance forever.
If I need a fresh object, I inject ObjectProvider or a lookup, not a raw field.”

Deutsch

30-Sekunden-Schablone

Klammern füllen. Nicht wie ein Skript vorlesen.

„[Konzept] gibt es, weil [Problem].
Spring/Java macht [Mechanismus].
Die übliche Falle ist [Falle].
In Produktion würde ich [Urteil].“

Beispiel:

„Bean Scopes gibt es, weil nicht jedes Objekt die ganze JVM über leben soll.
Default ist Singleton: eine Instanz pro Container. Prototype erzeugt eine neue Instanz, wenn Spring den Bean anfordert.
Die Falle: ein Prototype in einen Singleton injiziert — du behältst meist für immer dieselbe Instanz.
Wenn ich ein frisches Objekt brauche, injiziere ich ObjectProvider oder ein Lookup, kein nacktes Feld.“

Practice rule for this bank

For every question:

  1. Cover the answer with your hand.
  2. Speak the four parts.
  3. Uncover and score yourself: mechanism / trap / judgment (yes/no each).
  4. Redo only the parts you missed.

Three honest yeses means you can move on.

Deutsch

Übungsregel für diesen Katalog

Für jede Frage:

  1. Antwort mit der Hand zudecken.
  2. Die vier Teile sprechen.
  3. Aufdecken und scoren: Mechanismus / Falle / Urteil (ja/nein).
  4. Nur die verpassten Teile wiederholen.

Drei ehrliche Jas — dann weiter.