SPRING CORE / CATATAN</>↗Spring Core02 Mei 2025
Understanding Inversion of Control (IoC) and Dependency Injection (DI) in the Spring Framework can seem tricky at first, but it becomes intuitive when approached step by step. Here is a simplified explanation: 1. Inversion of Control (IoC) IoC is a principle in software design where the control of creating and managing objects is transferred (inverted) […]
JAVA 10 / CATATAN</>↗Java 1002 Mei 2025
Java 10 introduced enhancements to the Garbage Collection (GC) interface through the JEP 304: GC Interface, which abstracts garbage-collection implementations to improve integration and monitoring capabilities. While these improvements primarily simplify the addition of new garbage collectors to the JVM, they can also be leveraged to monitor memory usage and GC behavior in real time. […]
UTIL PACKAGE / CATATAN</>↗Util Package02 Mei 2025
When working with Java’s Optional in high-frequency code paths, it’s essential to understand and avoid the performance pitfalls associated with its usage. Although Optional provides functional-style coding benefits and helps prevent NullPointerException, it introduces additional overhead due to extra object creation and functional programming constructs. Here are some recommendations to ensure optimal performance: 1. Avoid […]
JSCH / CATATAN</>↗JSch01 Mei 2025
To download a file from an SSH server using JSch SFTP, you can use the ChannelSftp class from the JSch library. Below is an example of how to achieve this: Code Example: Downloading a file using JSch SFTP The JSch library is used to establish an SSH connection to an SFTP server and transfer files. […]
UTIL PACKAGE / CATATAN</>↗Util Package01 Mei 2025
Writing Optional-aware utility methods in Java involves keeping in mind the design of the Optional class, which is meant to represent potentially absent values in a neat, declarative way. Good utility methods avoid nulls and integrate smoothly with the existing Optional API. Here are a few practices and examples to guide you: 1. Use Optional […]
UTIL PACKAGE / CATATAN</>↗Util Package01 Mei 2025
Using Optional with custom monads or functional programming libraries can enhance code readability and handle null-like scenarios effectively. Here’s how you can integrate Optional with custom monads or functional programming libraries: 1. Understanding Optional in Functional Context Optional is essentially a simplified monad used to represent the presence or absence of a value. Custom monads […]