हिंदी

Explain the byte Data Type with an Example.

Advertisements

प्रश्न

Explain the byte Data Type with an Example.

स्पष्ट कीजिए
Advertisements

उत्तर

The byte data type is a primitive integer data type in Java that is used to store small whole numbers without decimal points. It is an 8-bit signed integer data type that occupies 1 byte of memory. It can store values ranging from −128 to 127.

Example:

byte age = 20;

In the above example, byte specifies the data type, age is the variable name, and 20 is the integer value assigned to the variable.

shaalaa.com
  क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
अध्याय 5: Primitive Values, Wrapper Classes, Types and Casting - EXERCISE [पृष्ठ ११२]

APPEARS IN

धीरज मेहरोत्रा Computer Science [English] Class 12
अध्याय 5 Primitive Values, Wrapper Classes, Types and Casting
EXERCISE | Q 4. (d) | पृष्ठ ११२
Advertisements
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×