public class Test1 {
public static void main(String[] args) {
byte b1=40;
byte b=(byte) 128;
System.out.println(b1);
System.out.println(b);
}
}
the output is
40
-128
the first output is 40 I understood but the second output -128 How it is possible ? is it possible due to it exceeds its range ? if yes how it works after byte casting...help me