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
*/