Using byte Variable

class ByteDemo {
    public static void main (String[] args) {
        //The byte type store values in the range from -128 to 127
        //We are creating a variable named maximumUsersPerGroup and storing the value 120
        byte maximumUsersPerGroup = 120;
        System.out.println("maximumUsersPerGroup value is " + maximumUsersPerGroup);

        //Try changing the value of maximumUsersPerGroup to 128 and Run again
        //Create your own byte type variable
        //Assign a value
        //And print the output


  1. Create a new byte variable called minimumAllowedAge and assign the value 12.
  2. Print the variable to the console using System.out.println();


Your output should be as follows



results matching ""

    No results matching ""