JAVA interview. Essential topics
This article is kind of a publication of my personal note. I started to collect this list of topics when was asked to help to interview a lot of guys for the Java Full-Stack Developer roles. Although, after that, I added a lot of new words when I was on the opposite side.
The keywords below actually are not ready-to-use questions but rather the tech interview plan that hopefully won’t let you forget to ask about some important things.
Java SE and JVM questions
- Concurrency: Sleep vs wait, volatile, ThreadLocal, Synchronized: in terms of block and method, thread-safe collections, Thread Pools, callable/runnable, process vs thread.
- Java Memory Model, CMS vs G1 GCs, weak references, object references life cycle in JVM: young and old generations, etc., class loading stages
- Memory leaks in Java: when and how happens, ways to prevent
- Final keyword: diff between usage for fields, methods, and classes. What exactly it restricts.
- The BigO for basic operations with data structures: binary search trees, r/b trees, hash tables, lists, etc. Diff between LinkedList and ArrayList, between HashMap and TreeMap. How and why the HashSet implementation uses the HashMap under the hood
- Lambdas. Functional interfaces: Supplier and Consumer
- Primitives vs wrapper classes: int vs Integer etc. What the proses and conses: space, usage, restrictions.
- Reflection: goals and benefits. Annotations: how to create; what the target and retention. How to process, AOP.
Around the Java
- Spring Framework: what the default scope of the bean, bean life-cycle, what is the IoC, existing types of DI, Spring vs Spring Boot, Spring MVC specific annotations, Spring Security. How to prevent popular vulnerabilities using it? Experience with other Spring modules?
- Hibernate: SessionFactory vs Session: scopes, time of living, cache levels and their goals, transaction management
- JProfiler: Use cases. Approach to figure out the performance bottlenecks on the production, memory leaks. VisualVM, JMX.
- TDD: principles, pros vs cons. Types of tests. JUnit functionality, Mockito
Other back-end questions
- SOLID, KISS, DRY what does really mean «the clean code». The composition or the inheritance.
- DBs: ACID, non-clustered vs clustered indexes, data structures are for indexes in RDBMSs, SQL vs PL/SQL, sharding. Why we need document-oriented or column-oriented DBs.
- Algorithms: Binary search logic, top-popular leetcode or hackerrank problems: adjust cells in the matrix, gas stations; single or dual linked list, dynamic programming principles, deep-first search vs breadth-first search, etc.
- Redis, Memcached: supplied data structures, clusters, etc. Cassandra vs Redis: pros and cons.
- Design patterns: builder vs factory method, the chain of responsibility vs command pattern, observer vs pub/sub, singleton vs prototype, etc.
- Distributed design: SOA, N-tier, event-driven vs message-driven, streaming, sharding. AMQP vs MQTT, Kafka vs RabbitMQ, load balancing logics: session stick, round-robin, etc., CQRS principles.
- HTTP(S): how it works to protect the transferring data, what the logic of OAuth(2) implementation. What the handshake process in terms of HTTP?
- Docker, K8s. What the goal of containerization, benefits, and restrictions.
Hope you enjoyed it! If you think some of these topics are useless to talk about at the interview or I forgot to mention something key-valued, let’s discuss. 😉