Java byte keywordThe Java byte keyword is a primitive data type. It is used to declare variables. It can also be used with methods to return byte value. It can hold an 8-bit signed two's complement integer. Points to remember
Examples of Java byte keywordExample 1: Using byte with variableTest it NowOutput: Example 2: byte lies out of rangeOutput: Example 3: Using byte with a methodOutput: The age must be: 18
Next TopicJava Case Keyword
|