I have this piece of code in java. I get the output as -1 (I was expecting an error though..). explain please! why?
public class Main {
public static void main(String[] args) {
int a=0xfffff;
byte b = (byte)a;
System.out.println(b);
}
}