Unlock Java Interview Success: Core JVM, Concurrency, DB & Linux Questions

This guide compiles over a hundred essential interview questions covering Java fundamentals, JVM tuning, thread pools, memory management, databases, Linux system internals, networking basics, and popular frameworks like Spring and Dubbo, helping candidates prepare comprehensively for backend development roles.

Java Backend Technology
Java Backend Technology
Java Backend Technology
Unlock Java Interview Success: Core JVM, Concurrency, DB & Linux Questions

Java Basics

Why JVM tuning often sets -Xms and -Xmx to the same value?

Core properties and processing flow of Java thread pools.

Java memory model and what is stored in the method area.

CMS garbage collection process.

How to optimize excessive Full GC occurrences.

Management of direct memory.

Meaning and implementation mechanisms of several thread‑pool parameters.

Pros and cons of using unbounded vs bounded task queues in thread pools.

Difference between CountDownLatch and CyclicBarrier.

Various synchronization mechanisms in Java (heavyweight lock, explicit lock, concurrent containers, synchronizers, CAS, volatile, AQS, etc.).

How to monitor memory leaks in a project.

Differences, advantages and disadvantages of mark‑sweep vs mark‑compact, and why mark‑compact causes stop‑the‑world.

Designing thread‑pool size based on CPU cores for CPU‑bound and I/O‑bound workloads.

Designing a cache.

Implementation of hashCode in String.

Singleton implementations in the JDK.

Choosing appropriate locking strategy when read threads far outnumber write threads.

Behavior when a thread pool is saturated and a new task is submitted.

What does the synchronized keyword lock, and how is it represented in bytecode and memory?

Whether wait/notify/notifyAll must be called inside synchronized blocks and why.

Typical usage patterns of ExecutorService and benefits of sharing a single instance per project.

Databases

InnoDB insert buffer and the probability and significance of double writes.

Effect of a single‑column index when a query returns two columns.

Usage of multi‑column indexes when only the first column is referenced, or when three columns are selected.

Impact of a WHERE condition like i+5<100 on index usage.

Whether LIKE '%aaa%' or LIKE 'aaa%' can use an index.

Differences among DROP, TRUNCATE, and DELETE.

Common practices for monitoring databases and troubleshooting slow SQL via slow‑query logs.

Support for emoji in databases, required character set (utf8mb4) and storage size per emoji.

First step when a query is slow – usually examining indexes.

Linux Basics

Viewing CPU core count and other kernel information via /proc.

How stack memory is allocated.

Purpose of common directories such as /etc, /bin, /dev, /lib, /sbin.

How stack frames are allocated.

Diagnosing a dead‑loop thread.

Differences between dynamic and static linking.

Process memory layout.

Finding all files opened by a process.

Common protocols and their default ports.

Reason for kernel mode and basics of protection mode.

How files are stored on disk.

Why threads exist in addition to processes and the benefits for SMP and context‑switch overhead.

InnoDB clustered index B+‑tree leaf nodes order relative to disk.

File systems, process management and scheduling, memory management mechanisms, virtual address protection.

Network Basics

Differences between HTTP/1.0 and HTTP/1.1.

DHCP IP allocation process: discovery, offer, request, and acknowledgment phases.

OSI seven‑layer model and personal understanding of each layer.

Frameworks

How Servlet ensures singleton pattern and possibility of multiple instances.

Dubbo request flow and underlying principles.

How Spring implements transaction management.

Injecting a specific implementation when multiple beans implement the same interface (using @Qualifier or @Resource).

Required Spring framework JARs and their purposes.

Why Spring Boot can run an HTTP service without being deployed to a web container.

Meaning of circular dependency injection in Spring and how to resolve it.

Placement of @Transactional annotation and its effect on automatic rollback, plus ways to prevent rollback.

How MyBatis prevents SQL injection.

Typical Tomcat parameter tuning.

Various serialization protocols and criteria for choosing one.

Redis incremental rehash process.

Designing server‑side code for daily order anomaly detection in an e‑commerce platform.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

javadatabaseconcurrency
Java Backend Technology
Written by

Java Backend Technology

Focus on Java-related technologies: SSM, Spring ecosystem, microservices, MySQL, MyCat, clustering, distributed systems, middleware, Linux, networking, multithreading. Occasionally cover DevOps tools like Jenkins, Nexus, Docker, and ELK. Also share technical insights from time to time, committed to Java full-stack development!

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.