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
क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
