0x2
0x2 is the hexadecimal representation of the integer 2. The prefix 0x is used in many programming languages to indicate base-16 notation, distinguishing it from decimal notation.
As a numeric constant, 0x2 equals 2 in decimal. In binary it is 0010, and in many
Language behavior: In Python, JavaScript, C, C++, and Java, the literal 0x2 evaluates to the integer value
In wider computing practice, hex notation helps humans read binary data or addresses more easily. While 0x2