SERVLET / NOTES</>↗Servlet10 Apr 2025
To build a WAR file for your Jakarta EE servlet application, the steps will vary depending on the build tool you are using. In this post I will show you how to use Apache Maven, build it in the IDE, or create it manually. Here’s how you can build a WAR file: 1. Using Maven […]
BASIC / NOTES</>↗Basic09 Apr 2025
The Java 10 JDK offers several command-line tools for developers to use. Here’s an overview of some useful tools and related features: 1. JShell (Interactive Java REPL) The jshell tool allows developers to experiment interactively by evaluating Java expressions, statements, and code snippets without the need to set up a complete program. It was introduced […]
BASIC / NOTES</>↗Basic09 Apr 2025
To set up Java 10 and compile your first program, follow these steps. Additionally, you’ll learn about Java 10’s var keyword feature once your setup is complete. Steps to Set Up Java 10 Download Java 10 JDK: Visit Oracle’s Java Archive. Download the Java 10 JDK installer suitable for your operating system. Install Java 10: […]
SERVLET / NOTES</>↗Servlet09 Apr 2025
To create a basic servlet using the HttpServlet class in Jakarta Servlet API, follow these steps: Steps to Create a Basic Servlet: Create a Java Class Extending HttpServlet: Your servlet class should extend the HttpServlet class provided in the Jakarta Servlet API. Define Servlet Annotations or Configuration: Use the @WebServlet annotation to define the servlet […]
BASIC / NOTES</>↗Basic09 Apr 2025
In Java 10, the var keyword was introduced to allow local variable type inference. This means that when you declare a local variable, the compiler automatically infers its type based on the initialization value. This improves readability and reduces boilerplate code, especially when working with complex types, without compromising type safety. Here’s a guide on […]
UTIL PACKAGE / NOTES</>↗Util Package09 Apr 2025
In Java, the Optional class provides methods like map and flatMap to enable functional-style transformations and chaining of operations without explicitly checking for null. Here is an explanation of when and how to use these methods effectively. 1. map The map method is used when you want to transform the value inside the Optional if […]