+ 2
Java challenge answer
Why is the answer to the output question: "Run Time Exception"? But when I run the code it gives me no errors, but result of 2, which I expected! https://code.sololearn.com/c6g64lkpRTLx/?ref=app
2 Réponses
+ 2
@Nitin Tiwari
I don't understand your explanation! What does the network's speed have to do with the right / wrong answer, since I got the answer?
maybe I wasn't clear enough: In a java challenge, one question was "What is the output of this code?" with 3 options: "RunTimeException", "2", "2.5". I chose the answer "2" which turned out to be false and when the correct answer shows as to be "RunTimeException".
I didn't understand why, so this is actually my question.
But anyway I went ahead to check in the code playground and, to my surprise, when I run the code I get the answer "2".
In conclusion, which is it right and why?
+ 2
So the answer of that questions was wrong. Sorry for the first answer did not understand your question well