2. 4. 1. Java byte: byte is smallest Java integer type.byte is 8 bit signed type ranges from –128 to 127.
public class Main { public static void main(String[] args) { byte b1 = 100; byte b2 = 20;
System.out.println("Value of byte variable b1 is :" + b1);
System.out.println("Value of byte variable b1 is :" + b2);
}
}
/*
Value of byte variable b1 is :100
Value of byte variable b1 is :20
*/
2. 4. Byte
2. 4. 1.
Java byte: byte is smallest Java integer type.byte is 8 bit signed type ranges from –128 to 127.