PLANTUML / CATATAN</>↗PlantUML17 Agt 2025
To visualize system components using PlantUML Component Diagrams, you’ll need to follow these steps. Component diagrams allow you to model and delineate the architecture of a larger system by showing how components interact with each other. Steps to Create a Component Diagram with PlantUML Set Up PlantUML To create component diagrams with PlantUML, you need: […]
PLANTUML / CATATAN</>↗PlantUML15 Agt 2025
In a modular architecture, package diagrams are a powerful way to represent the dependencies and relationships between different modules or packages within a system. With PlantUML, you can easily create package diagrams to visually describe your architecture and ensure modularity principles like separation of concerns, low coupling, and high cohesion are maintained. Here’s how you […]
JAVA DATE TIME API / CATATAN</>↗Java Date Time API14 Agt 2025
To create a custom date comparator in Java, you can follow these steps: 1. Understand the Requirements A date comparator is used to sort objects based on date values. For instance, consider a User class that has a Date field (e.g., ). We’ll compare and sort User instances by that date. birthDate 2. Define a […]
UTIL PACKAGE / CATATAN</>↗Util Package13 Agt 2025
The TreeMap class in Java is part of the java.util package and provides an implementation of the Map interface that keeps its keys sorted in a natural order (according to ) or a custom order (defined by a Comparator, if provided during construction)Comparable. It’s commonly used when you need to access keys in sorted order […]
NET PACKAGE / CATATAN</>↗Net Package12 Agt 2025
In Java, you can encode and decode URLs using the java.net.URLEncoder and java.net.URLDecoder classes. These classes handle encoding and decoding in compliance with the application/x-www-form-urlencoded MIME type. Here’s how you can encode and decode URLs: Code Example import java.io.UnsupportedEncodingException; import java.net.URLEncoder; import java.net.URLDecoder; public class URLEncoderDecoderExample { public static void main(String[] args) { try { […]
NET PACKAGE / CATATAN</>↗Net Package11 Agt 2025
Here are common ways to resolve domain names in Java, from simplest to more advanced use cases. Basic A/AAAA record lookup (IPv4/IPv6) Uses the system resolver and OS DNS settings. Returns all IPs (both IPv4 and IPv6 where available). import java.net.InetAddress; import java.net.UnknownHostException; public class DnsLookup { public static void main(String[] args) { String host […]