Ace Java Interviews: From Thread States to Design Patterns and Linux Tips
This article compiles practical interview advice, core Java concepts, thread and process differences, database transaction fundamentals, essential Linux commands, and design‑pattern basics to help candidates succeed in software‑development interviews, especially for major bank R&D centers.
Overview of Bank Software Development Centers
In the industry, the term “six major banks soft‑open” refers to the software development / R&D centers of the six large state‑owned commercial banks: Industrial and Commercial Bank of China (ICBC), Agricultural Bank of China, Bank of China, China Construction Bank, Bank of Communications, and Postal Savings Bank. Agricultural Development Bank, though a policy bank, is often discussed together because its software center’s recruitment scale and compensation are similar.
These banks have development centers in many cities (e.g., ICBC in Guangzhou, Zhuhai, Hangzhou, Beijing). Recent years have seen a shrinking recruitment trend, making it increasingly difficult to get hired.
ICBC Software Development Center – 2023: 900, 2024: 500, 2025: 260, 2026: 200
ICBC Business R&D Center – 2023: 130, 2024: 150, 2025: 100, 2026: 85
Bank of China Software Development Center – 2023: 630, 2024: 360, 2025: 220, 2026: 310
Agricultural Bank R&D Center – 2023: 720, 2024: 277, 2025: 344, 2026: 215
Interview Self‑Introduction Tips
A concise self‑introduction (1‑2 minutes) should highlight your main tech stack (e.g., Java backend development, distributed systems), showcase a concrete achievement, briefly mention 1‑2 relevant projects or competitions, and optionally express enthusiasm for the role.
State your primary technology stack and expertise.
Give a short example of a problem you solved (e.g., performance bottleneck, bug) and the impact.
Briefly mention a project or internship that aligns with the position.
If time permits, convey genuine interest in the company.
Java vs. C++ Differences
Java does not expose raw pointers, providing safer memory access.
Java supports only single inheritance for classes; C++ supports multiple inheritance (interfaces can be multiply inherited in Java).
Java has automatic garbage collection; C++ requires manual memory management.
C++ supports method overloading and operator overloading; Java only supports method overloading.
Other differences omitted for brevity.
Method Overloading vs. Overriding
Scope : Overloading occurs within the same class; overriding occurs between a superclass and its subclass.
Signature : Overloading requires the same method name but a different parameter list; overriding requires identical method name and parameter list.
Return Type : Overloading can change the return type; overriding requires the same return type or a subtype.
Access Modifiers : Overloading is independent of access level; overriding cannot reduce the visibility of the superclass method.
Binding Time : Overloading is bound at compile time; overriding is bound at runtime.
Process vs. Thread and Thread States
A process can contain multiple threads that share the heap and method area (or metaspace in JDK 1.8+), while each thread has its own program counter, virtual machine stack, and native method stack.
Java thread lifecycle states:
NEW : Thread created but not started (requires start()).
RUNNABLE : Ready to run, waiting for CPU time slice.
BLOCKED : Waiting for a monitor lock.
WAITING : Waiting for another thread’s notification or interrupt.
TIME_WAITING : Waiting for a specified timeout.
TERMINATED : Execution completed.
Threads transition among these states during execution.
Database Transactions
A transaction groups multiple SQL statements into a single logical unit that either fully succeeds or fully fails.
# Start a transaction
START TRANSACTION;
# Multiple SQL statements
SQL1;
SQL2;
# Commit the transaction
COMMIT;Most relational databases (MySQL, SQL Server, Oracle) provide ACID properties:
Atomicity : All actions succeed or none do.
Consistency : Data remains consistent before and after the transaction.
Isolation : Concurrent transactions do not interfere with each other.
Durability : Once committed, changes survive crashes.
In practice, atomicity, isolation, and durability are database guarantees; consistency is an application‑level concern.
Essential Linux Commands
Viewing memory‑intensive programs: top – real‑time system monitor. htop – interactive, colorful version of top. ps -ef or ps -aux – list processes; combine with grep to filter (e.g., ps aux|grep redis).
File searching with grep:
grep -i "error" /var/log/syslog # case‑insensitive search
grep -r "password" . # recursive search in current directory
ps -ef | grep "java" # find Java processesCommon grep options: -i: ignore case. -v: invert match. -n: show line numbers. -c: count matching lines. -l: list matching file names. -r: recursive directory search.
Design Patterns Overview
A design pattern is a reusable solution to a common software‑design problem, serving as a blueprint rather than a concrete implementation.
Benefits include improved reusability, readability, robustness, and maintainability, and they provide a shared vocabulary for developers.
Example: Chain of Responsibility
In an order‑processing system, validation steps such as inventory check, risk control, and payment verification can be arranged as a chain. Each handler processes its part and either passes the request onward or aborts with an error.
References
《周志明的软件架构课》 – https://time.geekbang.org/opencourse/intro/100064201
Designing Data‑Intensive Applications – https://book.douban.com/subject/30329536/
GitHub DDIA repository – https://github.com/Vonng/ddia
Linux Basics Summary – https://javaguide.cn/cs-basics/operating-system/linux-intro.html
IT Services Circle
Delivering cutting-edge internet insights and practical learning resources. We're a passionate and principled IT media platform.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
