Java Code Practice - Multiple Exceptions Not Working! | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
+ 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 Respostas
+ 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