๐Ÿ“Š We use cookies & analytics to improve your experience. Learn more
Latest

Java Programming Foundations Module 3 ยท Lesson 9 of 15

0% Exit to course

Module 3 ยท Exceptions, files and the interview set Lesson 9 of 15

The twenty questions fresher interviews repeat

Learning objective

The written round and the technical interview ask the same core set every year: String immutability, equals versus ==, the four pillars, ArrayList versus LinkedList, HashMap internals, and "what happens when an exception is thrown".

The concept

The same questions come back in almost every fresher Java round, so they are worth answering from memory: the difference between == and .equals(), ArrayList against LinkedList, String against StringBuilder, what a constructor does, method overloading against overriding, the four OOP pillars with your own example, and what a HashMap collision is.

Also in the set: checked against unchecked exceptions, final against finally, why main is static, what the JVM is doing when you run java Hello, what an interface is for, and a small problem โ€” reverse a string, count characters, find the second largest in an array โ€” written in front of them.

Plain text
Overload vs override . == vs .equals() . String immutability .
ArrayList vs LinkedList vs HashMap . checked vs unchecked exceptions .
interface vs abstract class . final vs static . pass-by-value .
HashMap internal working . garbage collection . throw vs throws .
constructor chaining . Comparable vs Comparator.

Answer each in three lines: what it is . why it exists . one code sketch.

Common mistakes

The mistake is memorising definitions without an example. "Polymorphism is having many forms" scores nothing next to "in my project, one Notification interface had an email and an SMS implementation". Prepare one line of your own for each, and the round stops feeling like a viva.

Worked example

Rehearse each answer out loud with one example from your own code. "I used a HashMap in this project because..." beats a definition every time.

Your practice task

Record yourself answering all twenty in under a minute each, then listen back once and note which answers went vague.

Do this before moving on. Reading a solution teaches the shape of it; typing it teaches you.

Key takeaway

The same questions come back in almost every fresher Java round, so they are worth answering from memory: the difference between == and .equals(), ArrayList against LinkedList, String against StringBuilder, what a constructor does, method overloading against overriding, the four OOP pillars with your own example, and what a HashMap collision is.

Create free account or sign in

Almost there

15 lessons left of 15

Finish every lesson to unlock the certificate. Each one ends in a practice task โ€” do them and the final project brief writes itself.

Next recommended course Python for Absolute Beginners