What Is the Java Development Kit (JDK)?
The JDK bundles the Java compiler, JVM, class library and tools. Learn how it differs from the JRE and JVM and which LTS version to install today.
Spread Your Knowledge. Questions with answers, tutorials and articles, newest first.
The JDK bundles the Java compiler, JVM, class library and tools. Learn how it differs from the JRE and JVM and which LTS version to install today.
Command-line arguments reach Java in the args array of main. Learn to read, validate and parse them, from simple loops to picocli.
main() is the entry point the JVM calls to run a Java program. See the classic signature, what each keyword means, and the simplified main added in Java 25.
Serializable writes fields automatically; Externalizable makes you write them yourself. See the differences, a runnable example and modern alternatives.
Implement Serializable, write with ObjectOutputStream and read with ObjectInputStream. Covers serialVersionUID, transient, security and alternatives.
Java serialization turns an object's state into a byte stream and back. Learn how Serializable works, how to version classes, and why filters matter.
Use Files.readString and Files.writeString for small files, buffered readers for large ones, and try-with-resources always. Includes the legacy java.io approach.
Learn how Java InputStream and OutputStream handle binary data, with buffered file copying, try-with-resources and java.nio.file examples.
How file I/O works in modern Java: Path and Files for reading and writing text and binary data, buffered streams, charsets and safe resource handling.
Compile a Pattern, create a Matcher and use matches, find and replaceAll. Includes named groups, flags, streams of matches and pitfalls like backtracking.
CORS lets a server say which other origins may read its responses. Learn the headers, preflight and how to configure CORS in Spring Boot and Spring Security.
Java regular expressions use java.util.regex Pattern and Matcher to match, extract and replace text. Learn the syntax, groups, flags and pitfalls.
String is immutable, StringBuilder is fast and not thread-safe, and StringBuffer is synchronised. Learn which one to use and why loops need a builder.
A complete Spring Framework setup for caching without Boot: Java configuration, cache annotations, SpEL keys, safe cached values and a test that proves it works.
A practical guide to Java string manipulation: immutability, comparing, splitting, StringBuilder, text blocks, formatting and Unicode pitfalls.
In Spring, @Cacheable lets a proxy return a stored result instead of running the method again. See how it works, how to set it up and how to test it.
A Java String is an immutable object that holds text. See how to create strings, compare them correctly, use common methods and text blocks, and when to use StringBuilder.
break exits a loop or switch, and continue skips to the next iteration. See examples, labeled forms for nested loops and modern alternatives.
The Java for-each loop reads each element of an array or collection with simple syntax. Learn its limits, common mistakes and when to use another loop.
The Java switch statement branches on one value. Learn classic syntax, arrow labels, switch expressions and pattern matching with runnable examples.