Skip to content

RU · in the original language

Почему BigDecimal считает 1.0 и 1.00 разными числами — и к чему это приводит в Java

Цена в базе осталась прежней, но приложение считает, что она изменилась, и повторно отправляет событие. Причина может скрываться в масштабе BigDecimal: equals() сравнивает не только числовое значение,…

Photo: Хабр
Хабр Russia · 23 October 2026

This is an extract. The full article is on Хабр.

Read at the source

Full text, translation and AI summary — after signing in

  • The full article in your language
  • AI summary and translation from the original
  • The same account works in the Suviy app

Free.

Comments

Sign in to join the conversation. Sign in

No comments yet.