How to remove an NZEC error when the output in IDE Compiler is correct?

There are cases when we face NZEC errors on submission of codes. Whereas the code is well compiled and well structured on an IDE that runs it correctly.
Definitely, it happens due to much more complex test cases than the sample cases.
How to get rid of the NZEC especially in JAVA?
How to tackle it?

Using Try-Catch block is not helping because the code is smoothly operational on the IDE. And the test cases are hidden. Any way out guys?

Thanks in advance !

1 Like

It means you are getting NZEC at some other test case.

Check your code if you can come up where the procedure just messes up. Like, if you are dividing a number by K, are you taking care of case when K=0?

The most probable causes are array out of bound or string out of bound exceptions, incorrect method of input. See if for some case you are raising an exception.

1 Like

Hey dear, please dont use “award point” feature to upvote. It will give your karma to the user. I dont want that you subtract your karma for it.

Instead, to award karma to a user, you can use the accept answer feature to accept answers by clicking on the “tick inside a circle” just below the “thumbs down” sign. It will give 15 points to user answering it, and award 2 points to you as well for accepting the answer. This is how 1 karma users are supposed to grow in the forum.

If you give your karma, then you wont be able to ask Q or may lose privileges. Thats my concern. I cannot award that point back to you for some reason, but i will upvote so you can continue asking Q.

1 Like