I've wrote a java code for User Define Exception . | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

I've wrote a java code for User Define Exception .

can anyone please help me out , my code has error in it. if mark is <0 or mark >100 it must throw exception else print the percentage https://code.sololearn.com/clJ4lK1x4TML/?ref=app

20th Sep 2018, 3:54 PM
Mallika Das
Mallika Das - avatar
2 Answers
+ 3
the main method should be in a class with the same name as the file. in the main method you should create a testexception class and then call its validate method. validate method, there is no adopts int table. offer https://code.sololearn.com/c5sxhSM62hZ2/?ref=app
20th Sep 2018, 7:18 PM
Daniel (kabura)
Daniel (kabura) - avatar
0
thank you so much :)
20th Sep 2018, 11:53 PM
Mallika Das
Mallika Das - avatar