Comprehensive Java Learning Roadmap: Fundamentals, Advanced Topics, and Practical Exercises

This extensive guide outlines a structured Java learning path covering JVM internals, core language features, concurrency, design patterns, networking, databases, big‑data tools, security, cloud concepts, and hands‑on coding exercises, complete with reference links and sample code snippets.

Qunar Tech Salon
Qunar Tech Salon
Qunar Tech Salon
Comprehensive Java Learning Roadmap: Fundamentals, Advanced Topics, and Practical Exercises

1. Fundamentals

1.1 JVM

1.1.1 Java Memory Model, Memory Management, Heap & Stack, Garbage Collection

References: JSR 133 , JMM FAQ

1.1.2 Understanding JVM Parameters and Tuning

1.1.3 Using Java Diagnostic Tools

jps, jstack, jmap, jconsole, jinfo, jhat, javap, … Resources: BTrace , CrashUB , TProfiler , HouseMD , jmxterm , TBJMap

1.1.4 Learning Java Diagnostic Tools

Eclipse MAT , VisualVM OQL

1.1.5 Writing OutOfMemory and StackOverflow Test Programs

Examples: HeapOutOfMemory, YoungOutOfMemory, MethodAreaOutOfMemory, ConstantPoolOutOfMemory, DirectMemoryOutOfMemory, StackOutOfMemory, StackOverflow

1.1.6 Practical Troubleshooting Tasks

Identify performance bottlenecks in slow Java programs, analyze frequent FullGC events, diagnose OutOfMemory situations in different generations.

1.1.7 Reference Materials

JVM Specification , Java Memory Model , JMM Cookbook

1.2 Java Core Knowledge

1.2.1 Reading Source Code of Core Classes

java.lang.String, java.lang.Integer, java.lang.Long, java.lang.Enum, java.math.BigDecimal, java.lang.ThreadLocal, java.lang.ClassLoader & java.net.URLClassLoader, java.util.ArrayList & java.util.LinkedList, java.util.HashMap & java.util.LinkedHashMap & java.util.TreeMap, java.util.HashSet & java.util.LinkedHashSet & java.util.TreeSet

1.2.2 Familiarizing with Variable Types

1.2.3 Mastering String API

1.2.4 Understanding Java Keywords

1.2.5 Working with Collections (List, Map, Stack, Queue, Set)

Iterate collections, use cases, sorting with java.util.Arrays.sort() and java.util.Collections.sort() , deduplicate lists, preserve order with LinkedHashMap , implement LRU cache using LinkedHashMap

1.2.6 Java IO & NIO

java.io.*, java.nio.*, NIO & Reactor patterns, file encoding, character sets

1.2.7 Reflection & Javassist

Reflection & Factory pattern, java.lang.reflect.*

1.2.8 Serialization

java.io.Serializable , purpose of serialization, interaction with Singleton, Google protobuf

1.2.9 Weak, Soft, and Phantom References

java.lang.ref.* – experiment with reference reclamation

1.2.10 System Properties

java.util.Properties

1.2.11 Annotation Usage

java.lang.annotation.*

1.2.12 JMS

javax.jms.*

1.2.13 JMX

java.lang.management.* , javax.management.*

1.2.14 Generics and Type Erasure

1.2.15 Autoboxing/Unboxing and Bytecode

1.2.16 Implementing Callbacks

1.2.17 Void Class Usage

1.2.18 Java Agent and premain

java.lang.instrument

1.2.19 Unit Testing

JUnit ( http://junit.org/ ), JMockit ( https://code.google.com/p/jmockit/ ), djUnit ( http://works.dgic.co.jp/djunit/ )

1.2.20 Regex Email Extraction Example

Use java.util.regex.* to replace '@' with '#'

1.2.21 Common Java Libraries

Apache Commons, Guava, Netty

1.2.22 API & SPI Concepts

API: Wikipedia , SPI: Wikipedia

1.2.23 Reference Materials

JDK src.zip, OpenJDK , Apache Commons, Guava, Netty, StackOverflow discussions on API vs SPI

1.3 Java Concurrency

1.3.1 Core Concurrency Classes

java.lang.Thread , java.lang.Runnable , java.util.concurrent.Callable , java.util.concurrent.locks.ReentrantLock , java.util.concurrent.locks.ReentrantReadWriteLock , java.util.concurrent.atomic.Atomic* , java.util.concurrent.Semaphore , java.util.concurrent.CountDownLatch , java.util.concurrent.CyclicBarrier , java.util.concurrent.ConcurrentHashMap , java.util.concurrent.Executors

1.3.2 Thread Pool Design Considerations

1.3.3 Locks

Types of locks, characteristics, usage scenarios, significance in concurrent programming.

1.3.4 synchronized vs. Lock

1.3.5 sleep vs. wait

1.3.6 wait and notify

1.3.7 Writing a Deadlock Example

1.3.8 Daemon Threads

1.3.9 volatile Keyword

Comparison with C++ volatile, happens‑before semantics, compiler and CPU reordering, see Memory Ordering , Volatile Variable , Preshing article

1.3.10 Thread‑Safety Question (code snippet)

public class Sample {
    private static int count = 0;
    public static void increment(){
        count++;
    }
}

1.3.11 Code Comparison (synchronized vs. AtomicInteger)

// code 1
public class Sample {
    private static int count = 0;
    public static synchronized void increment(){
        count++;
    }
}
// code 2
public class Sample {
    private static AtomicInteger count = new AtomicInteger(0);
    public static void increment(){
        count.getAndIncrement();
    }
}

1.3.12 Reference Materials

JVM Book , Intel Architecture Manuals

2. Advanced Topics

2.1 Java Low‑Level Knowledge

2.1.1 Bytecode and Class File Format

Resources: Wikipedia on class files , bytecode , instruction listings , Javassist ( link ), ASM ( link )

2.1.2 Implement a Mini‑javap Tool (no ASM)

Given source code, produce the equivalent disassembly output (example shown in the original document).

2.1.3 CPU Cache, False Sharing

Articles: Intel CPU Caches , False Sharing

2.1.4 Tail Recursion

2.1.5 Bitwise Operations

Implement arithmetic using bitwise operators.

2.1.6 Reference Materials

Books on Java performance, class file format, bytecode.

2.2 Design Patterns

2.2.1 Implement AOP

Differences between CGLIB and InvocationHandler, dynamic proxy, Javassist AOP, ASM AOP.

2.2.2 Template Method & Strategy for IoC

2.2.3 Singleton without synchronized/lock

2.2.4 NIO & Reactor Pattern

2.2.5 Reference Materials

ASM, CGLIB, Javassist resources.

2.3 Network Programming

2.3.1 Java RMI, Socket, HttpClient

2.3.2 Simple Static File HTTP Server

Features: client caching (304), concurrent download, thread‑pool request handling, NIO, rewrite rules, obey Open‑Closed Principle.

2.3.3 Deploy Nginx and Apache

Links: nginx , Apache

2.3.4 Implement FTP and SMTP in Java

2.3.5 CDN and DNS Basics

Set up DNS server, Squid or Apache Traffic Server, DNS role.

2.3.6 Reference Materials

HTTP/1.1 RFC, SMTP RFC, Open‑Closed Principle article.

2.4 Framework Knowledge

Study source of Spring, Spring MVC, iBatis; build a Java server using them.

2.5 Application Server Knowledge

Familiarize with JBoss, Tomcat, Jetty.

3. Expert Topics

3.1 Compiler Principles

3.1.1 Expression Parser (Oracle‑style sysdate arithmetic)

sysdate
sysdate - 1
sysdate - 1 / 24
sysdate - 1 / (12 * 2)

3.1.2 DSL Filtering of a List of Maps

QList<Map<String,Object>> mapList = new QList<>();
mapList.add({"name":"hatter test"});
... // add several entries
mapList.query("id is not null and id > 0 and name like '%hatter%'");

Expected result: the last two objects match the query.

3.1.3 Java‑like JavaScript Variable Scope Interpreter

var a = 1;
var b = 2;
var c = function(){
    var a = 3;
    println(a);
    println(b);
};
c();
println(a);
println(b);

Expected output: 3 2 1 2 (displayed as 3212 in the original example).

3.1.4 Reference Materials

AST, JavaCC, ANTLR resources.

3.2 Operating System Knowledge

Ubuntu, CentOS, Linux shell scripting.

3.3 Data Storage

3.3.1 Relational Databases

MySQL (execution plans, master‑slave, binlog), Derby, H2, PostgreSQL, SQLite.

3.3.2 NoSQL

Cache, Redis, Memcached, LevelDB, Bigtable, HBase, Cassandra, MongoDB, Graph DB (Neo4j).

3.3.3 Reference Materials

DB‑Engines ranking, Redis, LevelDB, HBase, Cassandra, MongoDB, Neo4j.

3.4 Big Data

3.4.1 Zookeeper Deployment

3.4.2 Solr / Lucene / Elasticsearch

Deploy SolrCloud, add/delete/query indexes.

3.4.3 Storm, Spark, S4

Deploy Storm with Zookeeper, run hello‑world topology locally and remotely.

3.4.4 Hadoop (Offline Computing)

HDFS (NameNode, DataNode, etc.), MapReduce (JobTracker, TaskTracker), Hive, Presto.

3.4.5 Distributed Log Collection (Flume, Kafka, Logstash)

3.4.6 Data Mining with Mahout

3.4.7 Reference Materials

Zookeeper, Solr, Storm, Hadoop, Presto, Flume, Logstash, Kafka, Mahout.

3.5 Network Security

3.5.1 Symmetric Encryption (DES, AES)

3.5.2 Asymmetric Encryption (RSA, DSA)

3.5.3 Hash Functions (MD5, SHA1)

3.5.4 SSL/TLS and HTTPS

3.5.5 Man‑in‑the‑Middle Attacks

3.5.6 DoS, DDoS, CC Attacks

3.5.7 CSRF Attacks

3.5.8 CSS Attacks

3.5.9 SQL Injection

3.5.10 Hash Collision DoS

3.5.11 Enhanced Security Techniques

Open Authentication, HOTP (RFC 4226), TOTP (RFC 6238), OCRA (RFC 6287), Salt.

3.5.12 OpenSSL Certificate for Apache/Nginx

3.5.13 Reference Materials

Cryptographic hash functions, block ciphers, public‑key cryptography, TLS, OpenSSL, Google Authenticator.

4. Extension Topics

4.1 Related Knowledge

4.1.1 Cloud Computing, Distributed Systems, High Availability, Scalability

4.1.2 Virtualization

LXC, KVM, Xen, Docker.

4.1.3 Monitoring

Nagios, Ganglia.

4.1.4 Load Balancing

Linux Virtual Server.

4.1.5 Git Usage

GitHub, Gitee.

4.1.6 Maven Usage

Apache Maven.

4.1.7 Gradle Usage

Gradle.

4.1.8 Small Language Exploration

Groovy, Scala, Lisp, Clojure, R, Julia, Lua, Ruby.

4.1.9 Understanding Character Encodings

ASCII, ISO‑8859‑1, GB2312/GBK/GB18030, Unicode, UTF‑8. Implement UTF‑8 conversion without using String.getBytes() .

4.1.10 Understanding Time

Time zones, DST, leap years, leap seconds, System.currentTimeMillis() .

4.1.11 Reference Materials

Git, UTF‑8, IANA time zones.

4.2 Extended Learning

4.2.1 JavaScript Knowledge

4.2.1.1 Prototype

Modify code to output "1 3 5" (jsfiddle link).

4.2.1.2 Closure

Explain why a button click does not alert the expected text and how to fix it (jsfiddle link).

4.2.1.3 Learn a JS Framework

jQuery, ExtJS, AngularJS.

4.2.1.4 Write a Greasemonkey Plugin

Reference Wikipedia article.

4.2.1.5 Learn Node.js

Node.js official site.

4.2.2 Learn HTML5

AngularJS documentation.

4.2.3 Reference Materials

ECMAScript, JSFiddle, JSBin, RunJS, Userscripts.org.

5. Recommended Books

"深入Java虚拟机" (Deep Java Virtual Machine), "深入理解Java虚拟机" (Understanding the JVM), "Effective Java", "七周七语言" (Seven Languages in Seven Weeks), "七周七数据" (Seven Databases in Seven Weeks), "Hadoop技术内幕", "HBase In Action", "Mahout In Action", "这就是搜索引擎", "Solr In Action", "深入分析Java Web技术内幕", "大型网站技术架构", "高性能MySQL", "算法导论", "计算机程序设计艺术", "代码大全", "JavaScript权威指南".

Source: http://www.hollischuang.com/archives/489 – Author: HollisChuang

QR Code
QR Code

Long‑press the QR code to open the course app (Android & iOS) for Qunar's latest video courses.

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.

tools
Qunar Tech Salon
Written by

Qunar Tech Salon

Qunar Tech Salon is a learning and exchange platform for Qunar engineers and industry peers. We share cutting-edge technology trends and topics, providing a free platform for mid-to-senior technical professionals to exchange and learn.

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.