int i; byte b; i = 1782; b = (byte) i; System.out.print(b);
Here i get -10 but cannot understand why. Please explain my how does cast in java work.