I want to do Exception and my program is wrong. Why? | SoloLearn: Learn to code for FREE!

0

I want to do Exception and my program is wrong. Why?

Exceptions https://code.sololearn.com/cbsX0Gc81IRY/?ref=app

4/28/2020 6:22:59 AM

Malick Diagne

1 Answer

New Answer

0

Malick Diagne the if statement must have a condition that either evaluates to true or false. Unlike C and C++, a value other than 0 is not true in Java nor 0 is false.