PLANTUML / CATATAN</>↗PlantUML04 Agt 2025
PlantUML is a powerful tool to create class diagrams that help in visualizing and designing object-oriented software. Below is a comprehensive guide to creating class diagrams with PlantUML for clear object-oriented design. 1. What is PlantUML? PlantUML is a text-based tool for creating UML (Unified Modeling Language) diagrams. It uses simple plain-text descriptions to generate […]
JAVA DATE TIME API / CATATAN</>↗Java Date Time API03 Agt 2025
In Java (starting from Java 8), you can format dates using the DateTimeFormatter class, which provides an easier and more modern approach to date and time formatting. This class is part of the java.time.format package and works seamlessly with the java.time API (e.g., LocalDate, LocalDateTime, ZonedDateTime). Here’s how you can format dates with DateTimeFormatter: Example […]
TEXT PACKAGE / CATATAN</>↗Text Package02 Agt 2025
You can format dates in Java using the SimpleDateFormat class, which is part of the java.text package. This class allows you to specify patterns describing the formatting and parsing of date and time objects. Here’s a step-by-step guide: Example of Formatting Dates with SimpleDateFormat package org.kodejava.text; import java.text.SimpleDateFormat; import java.util.Date; public class DateFormatExample { public […]
UTIL PACKAGE / CATATAN</>↗Util Package01 Agt 2025
Internationalization (i18n) involves designing applications so that they can be adapted to different languages, regions, and cultures. In Java, the Locale class is a fundamental part of i18n. It represents a specific geographical, political, or cultural region and is used in conjunction with various APIs to format dates, numbers, and text according to a specific […]
LANG PACKAGE / CATATAN</>↗Lang Package31 Jul 2025
In Java, System.currentTimeMillis() is commonly used as a simple way to measure the execution time of a block of code or a specific operation in terms of milliseconds. Here’s how you can effectively use it for performance timing: Example Usage package org.kodejava.lang; public class PerformanceTimingExample { public static void main(String[] args) { // Record the […]
UTIL PACKAGE / CATATAN</>↗Util Package30 Jul 2025
The Objects.requireNonNull() method is a utility provided in Java to enforce that an object is not null during runtime. It is part of the java.util.Objects class starting from Java 7 and is commonly used for validating method parameters, ensuring that null values don’t propagate and cause unexpected NullPointerExceptions later. Here’s a detailed explanation of how […]