KOTLIN / CATATAN</>↗Kotlin05 Mei 2025
In Kotlin, if expressions are used for decision-making. Unlike some other programming languages, Kotlin’s if is an expression, meaning it returns a value. This makes it more versatile because it can be directly assigned to a variable or used in a function return. Here’s how it works: 1. Basic if expression The simplest usage is […]
KOTLIN / CATATAN</>↗Kotlin05 Mei 2025
In Kotlin, data types like String, Int, and Boolean are fundamental types that are used to work with text, numbers, and logical values respectively. Kotlin provides these types as part of its standard library, and they are straightforward to use. Below is an explanation of how to work with them: 1. String A String in […]
KOTLIN / CATATAN</>↗Kotlin05 Mei 2025
In Kotlin, you can declare variables using two keywords: val and var. The choice between them depends on whether you want the variable to be immutable or mutable. 1. Declaring Immutable (Read-Only) Variables with val Use val when the value of the variable will not change after it is initialized. The variable becomes read-only (similar […]
KOTLIN / CATATAN</>↗Kotlin05 Mei 2025
Writing your first Kotlin program is simple! Follow these steps to create, write, and run your first Kotlin program: Step 1: Set Up Your Environment To write Kotlin programs, you need a development environment. The recommended setup is IntelliJ IDEA, which is specifically designed for Kotlin development. Download and Install IntelliJ IDEA: Visit JetBrains’ IntelliJ […]
JAVA 10 / CATATAN</>↗Java 1005 Mei 2025
Java 10 introduced new container-aware JVM features that greatly improve how Java applications run in Docker environments. These features provide enhanced automatic detection and utilization of container-based limits for memory and CPU resources, allowing Java applications to respect the constraints of containers better. Here’s a step-by-step guide to using the container-aware JVM features in Java […]
JSCH / CATATAN</>↗JSch05 Mei 2025
When working with SSH connections using JSch (a popular Java SSH library), it’s important to configure timeouts and keep-alive behavior correctly. This helps you: Avoid hanging indefinitely when a server or network becomes unresponsive Detect dead connections in a predictable way Keep long-lived sessions alive across unstable networks This article explains how to manage timeouts […]