Java Code Practice - Multiple Exceptions Not Working! | Sololearn: Learn to code for FREE!
Nouvelle formation ! Tous les codeurs devraient apprendre l'IA générative !
Essayez une leçon gratuite
+ 1

Java Code Practice - Multiple Exceptions Not Working!

don’t understand why my outputs are not accepted in case #2 and case #5. this is the code: code: https://code.sololearn.com/cA4jXbSL1n6Y/?ref=app Test Case 2: Input: 5 0 Your Output: Error: division by zero Expected Output: Error: division by zero Why is this wrong if the output is the same!?

7th Jul 2021, 3:20 PM
riniwtz
riniwtz - avatar
3 Réponses
+ 4
riniwtz Don't write this line "–ērror: division by zero" manually. Copy from the description and paste in the code. Then run your code.
7th Jul 2021, 3:52 PM
AÕĘJ
AÕĘJ - avatar
+ 1
I ŠīÄŠīć "T…™ŠīćŠīá" I realized that the ASCII value of ‚ÄėE‚Äô in the word ‚ÄúError‚ÄĚ is 1045. Thank you for answering!
7th Jul 2021, 4:01 PM
riniwtz
riniwtz - avatar
0
AÕĘJ I encountered the same error when I copied and pasted the messages to be printed from description/comments. I just solved it by manually typing it.
13th Jun 2022, 11:55 AM
Arjun B K
Arjun B K - avatar