मराठी

Explain the long Data Type with an Example.

Advertisements

प्रश्न

Explain the long Data Type with an Example.

स्पष्ट करा
Advertisements

उत्तर

The long data type is a primitive integer data type in Java that is used to store large whole numbers without decimal points. It is a 64-bit signed integer data type that occupies 8 bytes of memory. It can store values ranging from −9,223,372,036,854,775,808 to 9,223,372,036,854,775,807.

Example:

long population = 10000000000L;

In the above example, long specifies the data type, population is the variable name, and 10000000000L is the integer value assigned to the variable. The suffix L indicates a long integer literal.

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. (e) | पृष्ठ ११२
Advertisements
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×