Cracking the java interview

srirammahadevan

Sriram.Mahadevan

Posted on June 11, 2021

Cracking the java interview

Hey there!

I sometimes do technical interview for java. So I thought I would publish some of the questions I shoot, and the qualities I look for in an answer.

Easy interview

If my ask is to go easy on the interviewee for a not much demanding role below are the few questions I ask.

What I look for in the answer is the clarity of thought and if they really understand the topic. I also look for a good attitude and keenness for learning.

OOPS concept

  1. What is inheritance and write a sample code
  2. Why multiple inheritance is not possible in java
  3. What is polymorphism and write a sample code (both overloading & overriding)

Core java

  1. How a String is stored, immutability, intern etc
  2. Autoboxing & unboxing
  3. What is serialization

Collections

  1. Create a list with some duplicates. Then remove the duplicates
  2. In what scenarios they would use arraylist & linkedlist implementation
  3. Give a scenario to write a stream

Basic SQL

  1. I will ask them to write a basic sql query where they have to join two tables and maybe get a max value of a column

General Questions

  1. If you encounter a problem with a web application (ex system unavailable error) how do you go about debugging.
  2. Tell me anything that challenged you technically and how you overcame it

Difficult interview

If I am asked to interview for a more challenging role This is how I go about it

Here I look for is their strength in each topic and how they approach to each problem even if they don't know the exact answer.

FizzBuzz

  1. Write a program to print n number in Fibonacci series (If they implement DP , I would be really impressed)

Programming questions

  1. Write a program to print sqrt of a number without using Math package (This is a question I recently asked but I would change whenever I come across some interesting problems)

System Design questions

  1. I will give a scenario with a bottleneck and ask them to go about the solution. For eg. design a asynchronous system in java

Performance related questions

  1. How do they find place where a system is slow and how do they go about resolving it.
  2. If they have knowledge on database, I ask how they go about sql tuning or what they consider while writing a new query

Along with this I ask them some core java questions on threads, equals & hash methods overriding, springboot etc

How do you feel about these questions. Let me know some of the interesting questions you have (been) asked.

Happy Friday!

💖 💪 🙅 🚩
srirammahadevan
Sriram.Mahadevan

Posted on June 11, 2021

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related

Cracking the java interview
java Cracking the java interview

June 11, 2021