Hi Yogesh,
I am trying to divide the area by 0 but its not giving me any exception, its simply printing the infinity.
Please look the below code and let me why its not giving me any exception
Instructor
Yogesh Chawla Replied on 18/07/2021
Hi,
Ariithmetic Exception comes when a integer is divided by 0(byte, short, int,long - anyone of these four). This statement is not valid for float or double. With them, infinity only comes as any output.
ok Thanks, I got it.