Why does integer division by zero 1/0 give error but floating point 1/0.0 returns “Inf”?

前端 未结 5 773
别跟我提以往
别跟我提以往 2020-11-29 10:12

I\'m just curious about this:

When evaluating 1/0 in Java, the following exception occurs:

Exception in thread \"main\" java.la

5条回答
提交回复
热议问题