हिंदी

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
  क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
अध्याय 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. (a) | पृष्ठ ११२
धीरज मेहरोत्रा Computer Science [English] Class 12
अध्याय 6 Variables and Expressions
EXERCISE | Q 4. | पृष्ठ १३१
Advertisements
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×