sosc wrote:I'm not sure that's the point. I think the point is to know when an exception could be thrown. I could see the case where someone mistakenly putting a try catch block around doubles that might divide by 0.
Out of curiosity, why would you ever want to divide by zero?
867168 wrote:Just because people might be putting try/catch blocks everywhere, doesn't mean they are needed. Have you ever thought that maybe those people don't really know Java? You should be careful whose code you trust.
i just want to improve the concept. because i have seen many people who use try and catch block when double and float is divided by zero. if it does not shows exception then what is the need of try and catch block?
if somebody knows more on this topic please share his experience with us. and who thinks this is a really boring concept kindly move out of this thread.Well it is a pretty boring concept. At least unless we go down to the machine instructions and see how the FPU and integer division work.