what is infinity in java? | Sololearn: Learn to code for FREE!
Новый курс! Каждый программист должен знать генеративный ИИ!
Попробуйте бесплатный урок
+ 1

what is infinity in java?

1st Jan 2020, 11:24 PM
JasvX - avatar
2 ответов
+ 3
Double.POSITIVE_INFINITY is the infinity equivalent in Java and it represents a theoretical highest number.
1st Jan 2020, 11:43 PM
👑 Prometheus 🇸🇬
👑 Prometheus 🇸🇬 - avatar
+ 1
ArithmeticException is only defined for division by 0 for integer type values. If you try to divide a positive or a negative floating point number with 0 then you will get infinity or -infinity respectively.
2nd Jan 2020, 3:53 AM
Avinesh - avatar