Safety for checking MOD for negative values


/ Published in: Java
Save to your folder(s)

-13%2 = -1 so this might cause problem in your program sometime. So always write your code in such a way that it never cause any problem in sleep also.. :) Use anyone of the following code snippet.

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.