Skip to lesson

What Interviewers Look For Beyond the Right Answer

After the interview, the interviewer fills in a short scorecard. Two candidates can give the same right answer and still get very different scores, because the scorecard also rates how you got there and how you explained it.

The five signals interviewers score

A signal is something an interviewer notices and scores about you: your fundamentals, problem-solving process, communication, code quality or honesty.

Many companies give interviewers a short form with a few headings to rate. The headings differ, but most cover the five signals in this sample.

Example 1 · A sample interviewer scorecard

Text
Candidate: ______        Round: Technical 1Fundamentals        [1] [2] [3] [4]   notes: knows == vs equals, unsure on hashCodeProblem solving     [1] [2] [3] [4]   notes: asked about empty input, moved O(n^2) -> O(n)Communication       [1] [2] [3] [4]   notes: explained each step clearlyCode quality        [1] [2] [3] [4]   notes: good names, small methodsHonesty             [1] [2] [3] [4]   notes: said "not used WeakHashMap, would read docs"Recommendation:  Strong hire / Hire / No hire
What to notice
Each heading is a separate signal; the right final answer is only part of one row.

What this code does

  • This is a typical shape, not any company's real form. The headings vary, but most forms rate several signals separately.
  • Notice the notes: the interviewer writes down what you said and did, such as asking about empty input. That is why thinking aloud helps.

A scorecard is that short form. The first candidate, who explains each step and writes clean code, is easier to hire than the one who types silently and guesses, because the interviewer has seen how they work.

The five signals:

  • Fundamentals: correct definitions and knowing why things work.
  • Problem-solving process: clarifying, trying a simple idea, improving it, testing it.
  • Communication: clear words and a calm, short explanation.
  • Code quality: clear names, small methods, named constants.
  • Honesty: saying what you know and do not know, without bluffing.

Answer structure: definition, example, use

The definition-example-use structure answers any "What is X?" question in three short parts: a one-line definition, a tiny Java example and where it is used in real code.

Here is "What is polymorphism?" answered in those three parts. The Java code is the example part.

Weak answer: "An interface is a contract." It is correct but gives only a definition.

Example 2 · "What is polymorphism?" with a small example

PolymorphismAnswer.javaJava
interface Payment {    String pay(int amount);}
class UpiPayment implements Payment {    public String pay(int amount) {        return "Paid Rs " + amount + " by UPI";    }}
class CardPayment implements Payment {    public String pay(int amount) {        return "Paid Rs " + (amount + 2) + " by card (Rs 2 fee)";    }}
public class PolymorphismAnswer {    public static void main(String[] args) {        Payment[] payments = {new UpiPayment(), new CardPayment()};        for (Payment p : payments) {            System.out.println(p.pay(250));        }    }}
Output
Paid Rs 250 by UPI
Paid Rs 252 by card (Rs 2 fee)

What this code does

  • This is the "example" part of the answer: the same call p.pay(250) runs a different method for each object, decided at run time.
  • The "use" part follows naturally: a checkout loop like this works for any new payment type without changing a line.

Said aloud, the answer is: definition, "Polymorphism means one method call behaves differently depending on the actual object." Example, "A Payment interface with UpiPayment and CardPayment; p.pay(250) runs the right version." Use, "A checkout screen can accept any payment type without changing its code." It takes 30 to 60 seconds.

Revise: What is polymorphism (opens in a new tab).

Stop after the three parts. Let the interviewer ask a follow-up instead of talking for five minutes.

Weak and strong answers side by side

A weak answer is a memorised line or a ramble. A strong answer is short, correct and shows an example. Compare both for encapsulation, then for code.

Example 3 · Weak and strong answers to "What is encapsulation?"

Text
Weak:    "Encapsulation is data hiding."   (memorised, no example)Weak:    "Encapsulation is one of the four pillars. There are four          pillars, abstraction, inheritance... so basically it is like          a capsule, medicine is inside..."   (rambling, no point)Strong:  "Encapsulation means keeping an object's data private and          changing it only through methods that check the rules.          For example, a BankAccount has a private balance and a          withdraw method that refuses to go below zero.          So no other class can set an invalid balance directly."
Why the strong answer wins
Definition -> example -> use, in about 30 seconds.

What this code does

  • The strong answer has the three parts: a definition, a concrete class (BankAccount), and the benefit in real code.
  • "Data hiding" is not wrong, but alone it sounds memorised. Adding the example proves you understand it.

Example 4 · Same logic, two levels of code quality

CodeQualityDemo.javaJava
public class CodeQualityDemo {    // Version A: works, but hard to read    static int f(int[] a) { int c = 0; for (int i = 0; i < a.length; i++) { if (a[i] >= 40) c++; } return c; }
    // Version B: same logic, clear names and a named constant    static final int PASS_MARK = 40;
    static int countPassed(int[] marks) {        int passed = 0;        for (int mark : marks) {            if (mark >= PASS_MARK) {                passed++;            }        }        return passed;    }
    public static void main(String[] args) {        int[] marks = {35, 72, 40, 18, 90};        System.out.println("Version A: " + f(marks));        System.out.println("Version B: " + countPassed(marks));    }}
Output
Version A: 3
Version B: 3

What this code does

  • Both versions print 3, so both are "correct". Only Version B tells the reader what it does: countPassed, marks, PASS_MARK.
  • In an interview, Version B scores on code quality, and it is also easier for you to explain and debug under pressure.

The same applies to code. Code that works but uses names like a, f and c and a bare 40 looks careless. The same logic with clear names and a named constant shows that you write code other people can read.

Find the bug

Find the weak line

Select the line that is wrong.

Interviewer: "What is inheritance?" Which spoken line is weak?

Round 1 of 3

Thinking aloud while solving

Thinking aloud means saying your reasoning while you solve a problem: what you assume, which idea you try first and why you change it, so the interviewer can score your process.

The interviewer cannot score thoughts they do not hear. Below, the spoken plan sits in the comments and three test calls follow.

Example 5 · Thinking aloud, written down as comments

FirstRepeatedScan.javaJava
import java.util.HashSet;import java.util.Set;
public class FirstRepeatedScan {    // Said aloud: "Roll numbers are ints; the list can be empty.    // First repeated means the first scan whose roll was already seen.    // Brute force checks every pair, O(n^2). A HashSet gives O(n)."    static int firstRepeated(int[] scans) {        Set<Integer> seen = new HashSet<>();        for (int roll : scans) {            if (!seen.add(roll)) {                return roll;            }        }        return -1;    }
    public static void main(String[] args) {        System.out.println(firstRepeated(new int[] {12, 7, 31, 7, 12}));        System.out.println(firstRepeated(new int[] {}));        System.out.println(firstRepeated(new int[] {5, 6, 8}));    }}
Output
7
-1
-1

What this code does

  • The comment holds what a good candidate says before coding: assumptions about the input, the brute-force cost and the better plan. seen.add(roll) returns false when the roll is already in the set, and -1 means no repeat.
  • The three calls in main are the out-loud test: a normal case (7 is seen again before 12), an empty array and a list with no repeat.

Start by restating the problem and asking about the input. Then say a simple approach, its cost and a better one, narrate while you code and test with a small input out loud. Revise: clarifying questions and edge cases (opens in a new tab).

Lines you can use:

  • "Let me restate the problem to check I understood it."
  • "Can the input be empty, negative or very large?"
  • "A simple approach is ..., which is O(...). I can improve it by ..."
  • "Let me test it with the sample and with an edge case."

Order of execution

Think aloud in order

Put the spoken steps of a good coding answer in the order you would say them.

Saying "I don't know" well

Bluffing is making up an answer that sounds right when you do not know it. One follow-up question exposes it, and then the interviewer doubts your other answers too.

Every candidate meets a question they cannot answer. Below are three honest ways to reply to the same one.

Example 6 · Three honest scripts for a question you cannot answer

Text
Q: "What is a WeakHashMap?"1. Close topic you know:   "I have not used WeakHashMap. I know HashMap stores key-value pairs    with hashing. From the name, I would guess keys can be removed by    the garbage collector, but I would confirm that in the docs."2. Not used, can reason:   "I have not worked with it. Can I think about it for a moment?"   (then reason aloud from what you know)3. Completely new:   "I don't know this one. I would look it up in the Java docs.    Could we move on, and I will read about it today?"
Pattern
Honest + what you know + how you would find out

What this code does

  • Each script admits the gap first, then shows something useful: related knowledge, reasoning or a plan to learn.
  • In script 1 the guess is labelled as a guess. That is honest reasoning, not bluffing.

A good "I don't know" has three parts: say honestly that you have not used it, say what you know that is close, and say how you would find out. An honest gap in one topic costs far less than a bluff that falls apart.

Next step

Check your understanding

12 quick questions