Embedding Collections in Java Objects
Working with List Fields in Java Classes
When developing Java applications, you frequently need to model entities that contain multiple values of the same type. Whether it's a student's enrolled courses, a customer's order history, or a department's employee roster, the ability to embed a collection within an object is fundamental to object-ori ...
Posted on Thu, 15 Oct 2026 16:46:11 +0000 by newrehmi
Design and Implementation of a Smart Elderly Care Platform Using Java, Spring Boot, and Vue
Technology Stack
Back end Framework: Spring Boot
Spring Boot simplifies Java application development with built-in servers (Tomcat, Jetty, Undertow) and auto-configuration based on project dependencies. Its extensive ecosystem includes Spring Data, Spring Security, and Spring Cloud for rapid application development and integration.
Frontend Fra ...
Posted on Thu, 15 Oct 2026 16:41:12 +0000 by JayNak
Understanding the Producer-Consumer Model in Java: Three Implementations
Producer-Consumer Model
Basic Introduction
What is the producer-consumer model? Producers and consumers interact through a buffer. Producers generate data and store it in the buffer, while consumers retrieve and consume data from the buffer. Producers and consumers only interact with the buffer, not directly with each other.
The synchronization ...
Posted on Thu, 15 Oct 2026 16:41:20 +0000 by jonker
Merging Two Binary Trees in Java: DFS and BFS Implementations
The problem of merging two binary trees involves overlaying one tree onto another. When nodes from both trees overlap, their values are summed to create the value of the new node. If a node exists in only one of the trees, it is directly transferred to the resulting structure. This operation can be efficiently performed using either Depth-First ...
Posted on Thu, 15 Oct 2026 16:34:27 +0000 by TenFold
Understanding Java Inner Classes: Member, Local, Anonymous, and Static
Java allows defining classes within other classes or methods, known as inner classes. These include member, local, anonymous, and static inner classes.
Member Inner Classes
A member inner class is defined with in another class and has access to all members of the outer class, including private and static members.
class Shape {
private doubl ...
Posted on Thu, 15 Oct 2026 16:27:04 +0000 by lucidpc
Understanding a Hidden Loop in ConcurrentHashMap's computeIfAbsent Method
JDK Bug Analysis
This article discusses a subtle issue discovered in JDK 8 related to the computeIfAbsent method within ConcurrentHashMap.
Discovery Process
The issue came to light while reviewing changes in Apache Dubbo 2.7.7. A specific bug fix was noted:
JDK-8062841: Deadlock in ConcurrentHashMap.computeIfAbsent when keys have identical has ...
Posted on Thu, 15 Oct 2026 16:12:39 +0000 by k4pil
Real-time Stream Processing for Hot Article Calculation
Understanding Real-time Stream Processing
Real-time stream processing differs from batch processing by handling continuous, unbounded data streams with low latency. Unlike batch jobs that operate on complete datasets, stream processing applies computations to data as it arrives, often using incremental updates for efficiency.
Key Characteristic ...
Posted on Thu, 15 Oct 2026 15:59:52 +0000 by Pavlos1316
Understanding AOP, DI, and IOC in Java Spring Boot
In Java Spring Boot, AOP (Aspect-Oriented Programming), DI (Dependency Injection), and IOC (Inversion of Control) are essential concepts for building maintainable and scalable applications.
1. AOP (Aspect-Oriented Programming)
AOP separates cross-cutting concerns like logging, performance monitoring, and transaction management from business log ...
Posted on Wed, 14 Oct 2026 16:55:52 +0000 by duckduckgoose
Android Studio Development Essentials and Best Practices
Development Environment Setup
Android Studio, built on IntelliJ IDEA Community Edition, provides a comprehensive IDE for Android development. Key specifications include:
Version: Android Studio 4.1.1
Language: Java (JDK 1.8)
Build System: Gradle 4.1.1
Project Initialization
When creating a new project:
Select an Empty Activity template
Confi ...
Posted on Wed, 14 Oct 2026 16:54:43 +0000 by sri_hai1986
Understanding the Internal Mechanics of Java's ThreadPoolExecutor
ThreadPoolExecutor is the foundational class for thread pools in Java's concurrency utilities. It efficiently manages thread lifecycle and task execution based on configurable parameters. The constructor defines its core behavior:
public ThreadPoolExecutor(
int corePoolSize,
int maximumPoolSize,
long keepAliveTime,
TimeUnit unit ...
Posted on Wed, 14 Oct 2026 16:53:45 +0000 by jazappi