What Is the Model-View-Controller (MVC) Pattern in Java?
MVC splits a Java application into model, view and controller. See how it works with a plain Java example and Spring MVC.
2,889 posts about Java: questions with answers, tutorials and articles, newest first.
MVC splits a Java application into model, view and controller. See how it works with a plain Java example and Spring MVC.
JSP turns HTML templates into servlets. Learn the lifecycle, the elements, a modern Jakarta example with EL and JSTL, and when to choose alternatives.
A servlet is a Java class run by a web container that turns HTTP requests into responses. Learn the lifecycle, a working example and how it relates to Spring MVC.
Java applets ran in browser plug-ins until browsers dropped them. See the lifecycle, why they ended and the modern alternatives to migrate to.
Build a Java Swing GUI with JFrame, JLabel and JButton, learn layout managers, event listeners, SwingWorker and why the EDT matters.
JavaFX is Java's modern toolkit for desktop UIs, with a scene graph, CSS, FXML, and bindings. See how it works and run your first app.
Write a .java file, compile it to bytecode with javac, and run it on the JVM with java. Includes packages, JARs and fixes for common errors.
The Java API is the standard library that ships with the JDK. See its main packages, how to use it, and how to read the Javadoc.
javac turns Java source into platform-independent bytecode and catches errors early. See its phases, key options and how the JVM runs the result.
The JRE is the JVM plus class libraries needed to run Java programs. Learn how it differs from the JDK, why separate JREs ended after Java 11, and how jlink replaces it.
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.