JAVA / NOTES{ }↗Java29 Sep 2025
Using var effectively in local variable declarations in Java is primarily about balancing conciseness and clarity. Below are guidelines, best practices, and tips: When to Use var Obvious Initializer Types Use var when the variable’s initializer makes its type clear: var name = "Alice"; // Clearly a String var age = 25; // Clearly an […]
JAVA / NOTES{ }↗Java06 Sep 2025
To loop background music in Java using the Clip class from the javax.sound.sampled package, you can use the loop(int count) method of the Clip interface. Setting the count to Clip.LOOP_CONTINUOUSLY makes it loop indefinitely or until the stop() method is called on the Clip. Here is an example to help you achieve this: package org.kodejava.sound; […]
JAVA / NOTES{ }↗Java04 Sep 2025
Monitoring audio levels in real time is useful for applications like voice recorders, streaming tools, or any app that displays a volume meter. In Java, this is possible using the javax.sound.sampled package, specifically with the TargetDataLine class. In this post, you’ll learn how to: Capture audio input from a microphone Convert it into byte data […]
JAVA / NOTES{ }↗Java18 Aug 2025
In Java, you can delete files and directories recursively by writing a utility method. The strategy involves: Checking if a file is a directory: If it is, then recursively delete its contents first. Deleting the file or directory: After ensuring a directory is empty, delete it. Here’s an example implementation: Recursive Deletion of Files and […]
PLANTUML / NOTES</>↗PlantUML17 Aug 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 / NOTES</>↗PlantUML15 Aug 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 […]