+ 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 Answers
+ 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