Tagged articles
8 articles
Page 1 of 1
Java Captain
Java Captain
Feb 27, 2026 · Fundamentals

Long vs BigDecimal for Money: Ten Community Perspectives

A developer asks whether monetary amounts should be stored as Long or BigDecimal, and the article compiles ten varied community suggestions—ranging from using Long, BigDecimal, String, custom types, Protobuf, leadership directives, AI answers, frugal choices, to whimsical ideas—each with brief explanations and illustrative images.

BigDecimalData TypesJava
0 likes · 4 min read
Long vs BigDecimal for Money: Ten Community Perspectives
Java Captain
Java Captain
Feb 16, 2026 · Backend Development

Long vs BigDecimal: Choosing the Right Java Type for Money

This article compares ten community‑sourced approaches for representing monetary values in Java, explaining when a simple Long, a precise BigDecimal, a String, custom wrappers, Protobuf tricks, leadership directives, AI assistance, or even minimal integer types are appropriate, and why each choice matters.

Backend DevelopmentBigDecimalData Types
0 likes · 3 min read
Long vs BigDecimal: Choosing the Right Java Type for Money
macrozheng
macrozheng
Feb 3, 2026 · Backend Development

Long vs BigDecimal for Money: 10 Community Perspectives

The article explores the common dilemma of choosing between Long and BigDecimal for monetary values, summarizing ten distinct community suggestions ranging from using Long, BigDecimal, String, Protobuf, custom types, leadership advice, AI assistance, to minimalist integer approaches.

BigDecimalData TypesJava
0 likes · 4 min read
Long vs BigDecimal for Money: 10 Community Perspectives
Cognitive Technology Team
Cognitive Technology Team
Aug 12, 2022 · Backend Development

Handling Large Integer IDs in Java and JavaScript: Preventing Precision Loss with Jackson Configuration

When generating large IDs using Snowflake-like algorithms, Java's 64‑bit long values exceed JavaScript's safe integer range, causing display errors; the article explains how to resolve this by serializing Long values as strings in Spring Boot using Jackson's ToStringSerializer, both via configuration and annotations.

ID SerializationJacksonJava
0 likes · 2 min read
Handling Large Integer IDs in Java and JavaScript: Preventing Precision Loss with Jackson Configuration
Programmer DD
Programmer DD
Aug 15, 2021 · Fundamentals

Is Java’s long and double Access Truly Atomic? A Deep Dive

Through a multithreaded test program, this article explores whether Java’s 64‑bit long and double types are accessed atomically on 32‑bit and 64‑bit JVMs, explains the JVM memory model rules, and shows how volatility and hardware affect atomicity.

JVMJavaLong
0 likes · 10 min read
Is Java’s long and double Access Truly Atomic? A Deep Dive