Master Java Interview Essentials: From DNS to SpringBoot and Concurrency

This article combines a visual ranking of overtime intensity at major Chinese internet firms with a comprehensive Java interview guide covering URL processing, DNS resolution, HTTP status codes, TCP termination, abstract classes vs interfaces, HashMap versus ConcurrentHashMap, HashSet internals, MySQL functions, and the SpringBoot startup sequence.

Su San Talks Tech
Su San Talks Tech
Su San Talks Tech
Master Java Interview Essentials: From DNS to SpringBoot and Concurrency

In this article, the author first shares a visual ranking of overtime intensity among major Chinese internet companies, noting that Pinduoduo is the most demanding while others like Alibaba, Meituan and Tencent generally follow a 9‑9‑5 schedule.

The core of the article is a detailed Java interview guide from Tencent, covering fundamental topics:

1. What happens when you type a website URL?

URL parsing and validation.

Cache lookup hierarchy (browser, OS, router, ISP).

DNS resolution process from local cache to root, TLD and authoritative servers.

MAC address acquisition via ARP.

TCP three‑way handshake.

HTTPS TLS handshake.

HTTP request sending and server response handling.

2. How does DNS resolve a domain name?

Client sends DNS query to local DNS server.

Local server checks its cache; if miss, queries root server.

Root directs to TLD server.

TLD server returns authoritative server address.

Authoritative server returns the IP address.

Local server returns the IP to the client.

3. Common HTTP status code categories and examples (1xx informational, 2xx success, 3xx redirection, 4xx client error, 5xx server error) with typical codes such as 200, 301, 404, 500.

4. Why does TCP use a four‑way termination?

Client sends FIN, enters FIN_WAIT_1.

Server ACKs, enters CLOSE_WAIT.

Server sends its own FIN after sending remaining data, enters LAST_ACK.

Client ACKs, enters TIME_WAIT, then closes.

5. Differences between abstract classes and interfaces in Java

Abstract class can have fields, constructors, concrete methods; used for inheritance.

Interface defines a contract, can have default/static methods (Java 8+); supports multiple inheritance.

Implementation keywords: extends vs implements.

Access modifiers and method definitions differ.

6. HashMap vs ConcurrentHashMap (JDK 1.7 and JDK 1.8)

Memory structure: HashMap uses array‑list/tree; ConcurrentHashMap uses segmented locks (JDK 1.7) or CAS + synchronized (JDK 1.8).

Thread safety: HashMap is not thread‑safe; ConcurrentHashMap provides fine‑grained locking.

Performance: ConcurrentHashMap offers higher concurrency in multithreaded environments.

7. Underlying implementation of HashSet

HashSet is backed by a HashMap; elements are stored as keys with a constant dummy value, guaranteeing uniqueness and O(1) average operations.

8. Common MySQL functions

String: CONCAT, LENGTH, SUBSTRING, REPLACE.

Numeric: ABS, POWER.

Date/Time: NOW, CURDATE.

Aggregate: COUNT, SUM, AVG, MAX, MIN.

9. SpringBoot startup process

Create SpringApplication instance.

Initialize SpringApplicationRunListeners.

Load ConfigurableEnvironment.

Create ConfigurableApplicationContext.

Refresh context, apply auto‑configuration and instantiate beans.

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.

interviewSpringBoot
Su San Talks Tech
Written by

Su San Talks Tech

Su San, former staff at several leading tech companies, is a top creator on Juejin and a premium creator on CSDN, and runs the free coding practice site www.susan.net.cn.

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.