Java guides
Every published Java guide, newest first, with practical examples you can copy into your own project.
3,965 guides across 14 topics
Topics
Popular Java guides
Most readLatest Java guides
Page 18 of 109Java Runnable: Usage, Threads, and Executors
Learn how to use the Java Runnable interface with threads and executors, handle exceptions, and choose between Runnable and Callable.
Java Thread Class: Creating and Managing Threads
java thread class: Learn how to create and manage threads with the Java Thread class, including lifecycle, synchronization, and common pitfalls.
Java Threading: Creating and Managing Threads
Learn how to create and manage threads in Java with Thread, Runnable, and ExecutorService, plus practical tips for avoiding common concurrency issues.
Java Try-With-Resources for I/O: Syntax and Behavior
Java try-with-resources automatically closes I/O streams, handles multiple resources, and suppresses secondary exceptions. See syntax, examples, and custom AutoCloseable classes.
Java Byte Streams vs Character Streams: Key Differences
Byte streams read raw bytes; character streams decode and encode text. Learn how charset encoding affects correctness and which stream type fits your Java file I/O task.
Java FileWriter: Writing Text Files with Character Encoding
Learn how to use Java FileWriter for writing text files, controlling encoding, managing resources, and choosing between FileWriter and BufferedWriter.
Java FileReader: How to Read Text Files
Learn how to use Java FileReader to read character data from files, control encoding with charset-aware constructors, close resources, and improve performance with BufferedReader.
Using Java BufferedWriter for Efficient Text File Writing
When writing text to a file in Java, BufferedWriter reduces I/O overhead by collecting writes in an internal buffer. This guide covers creation, writing, flushing, closing, and exception handling.
Java BufferedReader: Efficient Text Reading
java bufferedreader: Learn how to use Java BufferedReader for efficient text input, covering creation, line reading, performance benefits, and resource management.
Java OutputStream vs Writer: Choosing the Right I/O API
Understand the difference between Java OutputStream and Writer, when to use each, and how character encoding affects text output.