Core Java II Course — Full Outline and Reading Order
The complete table of contents for Core Java II, the advanced-libraries companion to Core Java I: streams, I/O, XML, networking, databases, date and time, internationalization, security, Swing and the Foreign Function and Memory API. 110 articles in thirteen parts. Start here, or jump to any part.
kvi5hnuCode Sprout team member9 min readOn this page
This is the table of contents for the Core Java II course — the second half of the Core Java sequence, covering the parts of the standard library that most professional Java code actually sits on. The course targets Java 25 (the current LTS) and calls out what changed through Java 26–27 (Java 27 is the current release as of November 2026). Runnable examples use Java 25+ features like stream gatherers and IO.println.
Prerequisite
Core Java I — the language, objects, collections, concurrency and modules. Everything here assumes that foundation.
What you will learn
By the end of the course you will be able to:
- Transform data with streams, gatherers and collectors fluently; use
Optionalwithout reaching for.get(). - Read and write files and binary formats, use the NIO path API, walk directories, memory-map files and work with zip archives.
- Parse and generate XML with DOM, SAX, StAX, XPath, XSD and XSLT.
- Build networked services: sockets, the HTTP client (HTTP/2, WebSocket), the built-in
jwebserver, and SMTP. - Query databases through JDBC safely (prepared statements, transactions, pools).
- Handle dates, times, zones and formats with the modern
java.timeAPI. - Localize applications with locales, resource bundles and message formats.
- Run the Java compiler and script engines from code.
- Hash, sign and encrypt data with the modern security APIs (AES-GCM, EdDSA, ML-DSA, ML-KEM).
- Build desktop UIs with Swing — layouts, components, tables, trees — and draw with Java 2D.
- Call native code from Java using the Foreign Function and Memory (FFM) API.
How the course is organised
The course is thirteen parts, following the thirteen chapters of Core Java (Volume II). Articles are focused (10–20 minutes each) with runnable public class Solution programs and a short set of check-yourself questions at the end.
| # | Part | What it covers |
|---|---|---|
| 1 | Streams | Stream pipelines, Optional, collectors, gatherers, primitive and parallel streams |
| 2 | Input and Output | Byte and character streams, the Path API, directory walking, serialization, regex |
| 3 | XML | DOM, SAX, StAX, XPath, schema validation, XSLT |
| 4 | Networking | Sockets, TLS, URL/URI, the HTTP client, WebSocket, jwebserver, SMTP |
| 5 | Database Programming | JDBC end-to-end, prepared statements, transactions, pools |
| 6 | The Date and Time API | Instant, LocalDate, ZonedDateTime, formatting |
| 7 | Internationalization | Locales, number and date formats, collation, resource bundles |
| 8 | Compiling and Scripting | JavaCompiler and javax.script from code |
| 9 | Security | Hashing, signatures, certificates, symmetric and public-key encryption |
| 10 | GUI Programming | Toolkit history, Java 2D, events, preferences |
| 11 | Swing Components | Text, choice, menu, layout and dialog components |
| 12 | Advanced Swing and Graphics | Tables, trees, 2D rendering pipeline, images, printing |
| 13 | Foreign Function and Memory API | Calling native code from Java |
Part 1 — Streams
- Java Streams Explained: From Loops to Stream Pipelines — iteration vs. stream ops, laziness, the three stages.
- Creating Java Streams —
of,empty,generate,iterate,ofNullable, from collections, arrays, files, regex. - Java Stream
filter,map,flatMapandmapMulti— the core transformations. - Java Stream
limit,skip,takeWhile,concat,distinct,sorted,peek— substreams, combining, other transformations. - Java Stream Simple Reductions —
count,max,findFirst,anyMatchand friends. - Java
Optional: Getting, Consuming and Transforming — theorElsefamily,ifPresent,map/filter/or. - Java
OptionalBest Practices — misuse,of/ofNullable/empty,flatMap,Optional.stream. - Collecting Java Stream Results —
toList,toArray,joining, summary statistics. - Java
Collectors.toMap—toMap, merge functions, map suppliers. groupingByandpartitioningBy— grouping and partitioning.- Downstream Collectors —
counting,summing,mapping,filtering,teeing,collectingAndThen. - Implementing Custom Collectors —
Collector.of, supplier/accumulator/combiner/finisher. - Stream
reduceOperations —reduceforms, identity, associativity. - Predefined Stream Gatherers —
Gatherers.windowFixed,windowSliding,fold,scan,mapConcurrent. - Implementing Stream Gatherers —
Gatherer.of, integrator, state, finisher, greedy, combiner. - Primitive Streams:
IntStream,LongStream,DoubleStream— primitive streams and conversions. - Parallel Streams —
parallel, ordering, spliterators, when parallel pays off.
Part 2 — Input and Output
- Java I/O Streams: Reading and Writing Bytes —
InputStream,OutputStream, the stream zoo. - I/O Stream Filters:
Buffered,PushBack, Decorators — combining filters. - Text I/O:
PrintWriterandReader— reading and writing text, saving objects in text format. - Character Encodings and
Charset— encodings, default charset (UTF-8 since 18), reading characters. DataInput/DataOutputand Binary Files — binary formats.- Random Access Files in Java —
RandomAccessFile, fixed-size records. - Zip Archives and the Zip File System —
ZipInputStream/ZipOutputStream, JAR, zip file system provider. - The NIO Path API —
Path,resolve,relativize,normalize. Files: Read, Write, Create —Filesreading/writing, creating files and directories, temp files.Files: Copy, Move, Delete and Attributes — copy, move, delete, options, attributes.- Listing and Walking Directories —
list,walk,find, glob,DirectoryStream,FileVisitor. - Memory-mapped Files in Java —
FileChannel.map, performance,MemorySegmentmapping. - NIO Buffers —
Buffer,ByteBuffer, position/limit/capacity,flip, views. - File Locking in Java —
FileLock, shared/exclusive, pitfalls. - Object Serialization Basics —
ObjectOutputStream,Serializable, object graphs. - Serialization: The Stream File Format — stream format, handles, class descriptors.
transient,readObject,Externalizable— customising serialization; records.readResolve, Versioning and Security —readResolve/writeReplace,serialVersionUID, filters, cloning.- Regex Syntax in Java — character classes, quantifiers, boundaries, groups.
- Regex
Matcher:findand Groups —matches,find, results, named groups. - Regex
split,replaceand Flags —split,splitWithDelimiters,replaceAllwith functions, flags.
Part 3 — XML
- XML in Java: Introduction and Document Structure — XML basics, elements vs. attributes.
- Parsing XML with the Java DOM —
DocumentBuilder, the DOM tree, whitespace, secure parsing. - XML DTD Validation in Java — document type definitions.
- XML Schema Validation in Java — XML Schema, a practical example.
- XPath in Java — XPath expressions and the XPath API.
- XML Namespaces in Java — namespaces, namespace-aware parsing.
- SAX and StAX Parsers in Java — SAX handler, StAX pull parsing.
- Generating XML with DOM and StAX — building documents, writing with LSSerializer/Transformer and StAX.
- XSLT Transformations in Java — XSLT stylesheets and the Transformer API.
Part 4 — Networking
- Sockets: Connecting to a Server in Java — telnet,
Socket, timeouts,InetAddress. - Server Sockets and Multiple Clients —
ServerSocket, one-thread-per-client, virtual threads, half-close. - Interruptible Sockets and TLS —
SocketChannel, interruption,SSLSocket. URI,URLandURLConnection—URIvs.URL,URLConnection, headers.- Posting Form Data in Java — POST, URL encoding, multipart basics.
- The Java HTTP Client: Requests and Responses —
HttpClient,HttpRequest, body publishers and handlers. - Async HTTP and WebSocket in Java —
sendAsync, HTTP/2, WebSocket. - A Simple HTTP Server with
jwebserver—jwebserver,HttpServer, handlers, filters. - Sending Email from Java with Jakarta Mail — Jakarta Mail, SMTP.
Part 5 — Database Programming
- JDBC Design and SQL Basics — JDBC architecture, driver types, SQL refresher.
- JDBC Configuration and Connecting — URLs, drivers,
DriverManager,DataSource. - JDBC Statements,
ResultSetandSQLException— executing SQL, resources, SQL exceptions and warnings. - JDBC Prepared Statements and SQL Injection —
PreparedStatement, parameters, injection. - JDBC LOBs, Escapes, Multiple Results, Generated Keys — LOBs, escapes, multiple results, generated keys.
- JDBC Scrollable and Updatable Result Sets — scrolling and updating result sets.
- JDBC Row Sets —
CachedRowSetand friends. - JDBC Metadata —
DatabaseMetaData,ResultSetMetaData. - JDBC Transactions, Savepoints and Batch Updates — transactions, save points, batch updates, advanced SQL types.
- JDBC Connection Pools and the Enterprise — pools,
DataSourcein servers, JPA outlook.
Part 6 — The Date and Time API
Instant,Durationand the Java Time Line —Instant,Duration, the time line.LocalDate,PeriodandTemporalAdjusters— local dates,Period,TemporalAdjusters.LocalTime,LocalDateTimeandZonedDateTime— local time, local date-time, zones, DST.- Formatting, Parsing and Legacy Interop —
DateTimeFormatter, legacyDate/Calendarconversion.
Part 7 — Internationalization
- Java
Localeand Language Tags —Locale, language tags, default locale, display names. - Number Formats,
DecimalFormatand Currencies —NumberFormat, compact numbers,DecimalFormat,Currency. - I18n Dates, Collation, Normalization — localized dates,
Collator,Normalizer. MessageFormatandChoiceFormat— message formatting, plurals and choices.- Text Boundaries, Text I/O and Encodings —
BreakIterator, line endings, console, BOM, source encoding. - Resource Bundles — locating bundles, property files, bundle classes, a complete example.
Part 8 — Compiling and Scripting
- The Java Compiler API:
JavaCompilerand Diagnostics — invokingjavac, tasks, diagnostics. - In-memory Code Generation with the Compiler API — in-memory sources and bytecodes.
- The Java Scripting API —
javax.script, engines, bindings, invocable.
Part 9 — Security
- Class Loading, the Loader Hierarchy, Namespaces — class loading, loader hierarchy, namespaces.
- Writing a Custom Class Loader and the Verifier — custom loader, the verifier.
- JAAS: User Authentication in Java — JAAS, login modules, Security Manager removal.
- Message Digests and Password Hashing —
MessageDigest, SHA-2/SHA-3, PBKDF2. - Digital Signatures: Sign and Verify —
Signature, key pairs, EdDSA, ML-DSA. - Certificates,
keytooland Code Signing — the authentication problem, certificates,keytool,jarsigner. - Symmetric Encryption with AES-GCM —
Cipher, key generation, cipher streams. - Public-key Encryption: RSA and KEM — RSA, hybrid encryption, KEM, ML-KEM.
Part 10 — Graphical User Interface Programming
- GUI Toolkits History and
JFrame— AWT, Swing, JavaFX history; displaying frames. - Java 2D: Shapes, Color, Fonts, Images —
paintComponent, shapes, colors, fonts, images. - Swing Event Handling: Listeners and Actions — events, listeners, adapters, actions.
- Mouse Events and the AWT Event Hierarchy — mouse events, the AWT event hierarchy.
- The Java Preferences API — storing user preferences.
Part 11 — Swing User Interface Components
- Swing MVC and Layout Managers — MVC in Swing,
FlowLayout,BorderLayout,GridLayout. - Text Fields, Labels and Text Areas — text input components.
- Checkboxes, Radio Buttons, Combo Boxes, Sliders — choice components and borders.
- Menus, Toolbars and Tooltips — menus, mnemonics, accelerators, toolbars.
GridBagLayoutand Custom Layout Managers — grid-bag layout, custom layouts.- Dialogs:
JOptionPaneandJFileChooser— option panes, dialogs, data exchange, file dialogs.
Part 12 — Advanced Swing and Graphics
JTableand Table Models — tables, models, rows and columns, sorting, filtering.JTableRenderers and Editors — cell rendering and editing.JTreeand Tree Models — trees, tree paths, rendering, events, custom models.- The 2D Rendering Pipeline: Shapes and Areas — pipeline, shape hierarchy, constructing shapes, areas.
- 2D Strokes, Paint, Transforms, Clipping, Composition — strokes, paint, transforms, clipping, transparency.
- Raster Images:
ImageIOand Filters —ImageIO, image manipulation, image filters. - The Java Printing API — graphics printing, multi-page, print services, attributes.
Part 13 — The Foreign Function and Memory API
- JNI and Native Methods — JNI basics and why FFM replaces it.
- FFM: Arenas and Memory Segments — calling a first function, arenas, memory segments.
- FFM: Memory Layouts and Structs — memory layouts, structs, arrays.
- FFM: The
Linkerand Downcalls — looking up and invoking foreign functions,jextract. - FFM: Upcalls,
VarHandle, Varargs,errno— callbacks, var handles, varargs,errno.
Start here: Java Streams Explained: From Loops to Stream Pipelines
Related reading
- Core Java Course — Full Outline and Reading Order
- Your First Java Program Explained: Classes, main, Statements and Comments
- JShell Tutorial: Java's Interactive REPL for Quick Experiments
- Using a Java IDE: IntelliJ IDEA, VS Code and Eclipse for Beginners
- How to Compile and Run Java Programs from the Command Line

More in Core Java II
FFM Upcalls, Variadic Functions and errno
Advanced FFM calls: passing Java code to C as function pointers with upcall stubs, binding objects and lambdas, calling variadic functions such as printf, capturing errno and GetLastError, and a C library that calls back into Java. The final article of the course.
Calling Foreign Functions: Linker, Symbol Lookup, Downcalls and jextract
Calling C functions from pure Java with the FFM API: the native linker, default, library and loader symbol lookups, function descriptors, downcall handles, invokeExact, pointers and NULL, struct results, critical calls, enabling native access, and generating bindings with jextract.
FFM Memory Layouts: Structs, Unions, Sequences and Var Handles
Describing C data with FFM memory layouts: value layouts and C types, struct and union layouts, alignment and padding, sequences, layout paths, var handles with base offsets, offset and slice handles, pointers with target layouts, and atomic access modes.
Foreign Function and Memory API: Arenas and Memory Segments
Getting started with the FFM API (final since Java 22): a first foreign call, confined, shared, automatic and global arenas, native and heap memory segments, reading and writing values, C strings and arrays, alignment and byte order, slices, copies, allocators, and memory-mapped files.
Discussion
Sign in to ask a question or share what you learned.