int
- Last UpdatedSep 17, 2025
- 1 minute read
This topic is about the int data type.
Value syntax
1
-365
Description
Int represents integer numbers.
-
The default value of the int type is zero, 0.
-
Int type supports arithmetic and comparison operators.
Autocasting
Int type supports autocasting for:
-
string, if in the correct input format; otherwise, it will raise an exception.
int a=”2”; //a=2;
-
double
int a=2.6; //a=2
Methods
This table shows the currently implemented methods.
|
Method |
Return type |
Parameters |
Description |
|---|---|---|---|
|
ToString |
string |
Returns a string that represents the current int value. |