Explain the int Data Type with an Example.
Advertisements
प्रश्न
Explain the int Data Type with an Example.
Explain the int data typе.
स्पष्ट कीजिए
Advertisements
उत्तर
The int data type is a primitive data type in Java that is used to store whole numbers without decimal points. It is a 32-bit signed integer data type that occupies 4 bytes of memory. It can store both positive and negative integer values ranging from −2,147,483,648 to 2,147,483,647.
Example:
int age = 18;
In the above example, int specifies the integer data type, age is the variable name, and 18 is the integer value assigned to the variable.
shaalaa.com
क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
