Java Program to Round a Number to n Decimal Places

preview_player
Показать описание
#Java #Program to #Round a #Number to n #Decimal Places

In this java tutorial, you'll learn to round a given number to n decimal places in Java.

Рекомендации по теме
Комментарии
Автор

Could you help me out? I need to cut my number without rounding it. And your method rounds the number. For example the number 21.4567 should be shown an 21.45 and not as 21.46, which method could I use? Or what should I do generally?

minus