You are viewing a single comment's thread. Return to all comments →
suggesting to use the fixed numeric min and max value for size check / if(x>=-128 && x<=127) / is not a good pattern.
I think the wrapper Classes MIN_VALUE, MAX_VALUE is more safe for this job.
if(x>= Byte.MIN_VALUE && x<=Byte.MAX_VALUE) ... etc