Since I’ve attended several job interviews recently, I’ve decided to share some experience with you. Why hard part? Because this article is going to be about technical stuff. I’m going to write something about soft part later. Technical interview will probably look a bit different depending on your programming background. If you are new, expect more core language / programming questions. Later on emphasis probably shifts more towards your actual work experience, technologies, frameworks and practical problem solving skills. I’m not going to answer questions (I’m lazy), just provide list of topics you might want to review if you are going to a Java interview.
General object oriented programming / design core
- Explain polymorphism, encapsulation, cohesion, coupling.
- Difference between inheritance and aggregation.
- What does “clean code” and “technical debt” mean to you?
- Describe some refactoring techniques.
- Explain SOLID principles.
- Other principles like KISS, DRY, YAGNI, law of Demeter etc.
- What design patterns do you know, explain some.
- What design anti-patterns do you know?
- How would you design an amphibious vessel / math expression evaluator / a dragon?
- What sorting algorithms do you know and what’s their computational complexity? Which would you choose having some knowledge about the data you are given?
- Write a code that:
- calculates a factorial of given number
- does a Fizz Buzz
- inverts order of letters in words of given sentence.
- checks if given string is a palindrome.
- enumerates all permutations / variations of given set of characters
- What is the contract between equals and hashCode and how it’s used in Java collections?
- Describe Java collections, interfaces, implementations. What’s the difference between LinkedList and ArrayList?
- What’s the difference between primitives and wrappers, where do they live, what’s autoboxing?
- Where can you put keywords final and static and what do they do?
- Access modifiers in Java.
- Difference between String and StringBuilder / StringBuffer.
- Difference between interface and abstract class.
- Difference between overriding and overloading.
- Types of exceptions and “handle or declare” rule.
- How does garbage collector work?
- How would you deal with memory leak / stack overflow problem?
- How to make a class immutable and what’s the point?
- What’s JIT compilation?
- What’s new in Java 8 / Java 7? What’s coming in Java 9?
Hibernate / databases
- What’s ORM?
- Describe benefits and drawbacks of Hibernate.
- Difference between Hibernate and JPA
- What’s new in latest versions of Hibernate?
- What’s lazy loading?
- What’s N+1 problem?
- Explain some Hibernate annotations.
- What’s Hibernate Session and SessionFactory?
- States of entity beans.
- Cashing levels in Hibernate.
- Transactions support in Hibernate.
- What’s optimistic locking?
- Describe ACID principles.
- Describe database normalizations.
- How would you approach to optimization of a slow query?
- What’s new in latest versions of Spring?
- Describe benefits and drawbacks of Spring.
- What’s inversion of control and dependency injection?
- What Spring modules have you used?
- What types of dependency injection can be used in Spring?
- What modes of auto wiring are available in Spring?
- Describe Spring MVC.
- Scopes in Spring.
- Bean life cycle.
- What’s the difference between Spring Bean and EJB Bean?
- Explain Aspect Oriented Programming.
- What’s the difference between GET and POST?
- What’s the difference between web server, web container and application server?
- Describe what’s happening in Java web application between entering an url in browser and getting the requested web page.
- What’s a n-layer architecture?
- What are the differences between microservices and monolithic applications?
- What enterprise design patterns do you know?
- How would you test an application? Different layers of tests. What testing frameworks do you know?
- How would you test a single method?
- What was the hardest technical challenge you’ve faced in your career?
- What’s Domain Driven Development?
- Name some important plug-ins for your favourite IDE.
- Apart from IDE, what tools do you find essential for your daily work?
- What version control tools have you used?
- What’s the difference between branch and tag?
- What tools for continuous integration / build / static code analysis have you used?
There is more
As usual. I’ve tried to cover most typical for the interview. There are plenty stuff aside from core language and everything depends on particular job and your resume. Personally I’m not a big fan of strict specialisation and like to do full stack development from database to frontend, with maybe more bias towards backend. Most popular technologies around Java backend are now probably Spring and Hibernate, that’s why I gave them separate sections here. Most popular stuff for front end would now be Angular.JS and Bootstrap. But more on that later on.
There is plenty information on the internet about “[technology name] interview questions”, go ahead and google what you need. If you like to hold a book in your hand, there are several on the topic of programming interviews, I’ve read three of them some time ago, you may find some useful stuff there as well:
- Programming Interviews Exposed: Secrets to Landing Your Next Job
- Coding Interviews: Questions, Analysis & Solutions
- Cracking the Coding Interview.
Good luck on your technical interviews! In the next episode we are going to talk about soft parts of software developer recruitment process :)
September 22, 2017 at 11:35 am
thanks for sharing with us.