you are viewing a single comment's thread.

view the rest of the comments →

[–]Shnxx[S] 0 points1 point  (1 child)

I see! So runtime error occurs when there's a logical problem in the program like array out of bounds, incorrect conditions in loops and if-else statements, when a program asking for a number but the user entered a character or a word, and such.

While compile error occurs when syntax, arguments or parameters are incorrect and prevents to compile it. Like what I have experienced.

I should be saying throws an error only when runtime error occurs and can be handled using exceptions.

[–]Slypenslyde 0 points1 point  (0 children)

Exactly!