Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Although we can not have undefined behaviour in Java we still have to ensure that we get the correct results. So we should explicitly check for ranges

Code Block
bgColor#ccccff

if(shift_value > 31 or shift_value <0)
  throw ArithmeticException;
else
int val = 2 << shift_value;




Operations Requiring Really Long Numbers

...