मराठी

Explain the short Data Type with an Example.

Advertisements

प्रश्न

Explain the short Data Type with an Example.

स्पष्ट करा
Advertisements

उत्तर

The short data type is a primitive integer data type in Java that is used to store whole numbers without decimal points. It is a 16-bit signed integer data type that occupies 2 bytes of memory. It can store values ranging from −32,768 to 32,767.

Example:

short age = 25;

In the above example, short specifies the data type, age is the variable name, and 25 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. (c) | पृष्ठ ११२
Advertisements
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×