# Int

`Int`

, a 32-bit signed integer (equivalent to Java's `int`

primitive type) is a
subtype of AnyVal. Instances of `Int`

are not
represented by an object in the underlying runtime system.There is an implicit conversion from Int => runtime.RichInt
which provides useful non-primitive operations.

class AnyVal

trait Matchable

class Any

## Value members

### Methods

@deprecated("Adding a number and a String is deprecated. Use the string interpolation `s\"$num$str\"`", "2.13.0")

@deprecated("Adding a number and a String is deprecated. Use the string interpolation `s\"$num$str\"`", "2.13.0")

Implicitly added by int2long

Returns this value bit-shifted right by the specified number of bits,
filling the new left bits with zeroes.

- Example
`21 >>> 3 == 2 // in binary: 010101 >>> 3 == 010`

`-21 >>> 3 == 536870909 // in binary: 11111111 11111111 11111111 11101011 >>> 3 == // 00011111 11111111 11111111 11111101`

- Source
- (source)

Implicitly added by int2long

- Example
`21 >>> 3 == 2 // in binary: 010101 >>> 3 == 010`

`-21 >>> 3 == 536870909 // in binary: 11111111 11111111 11111111 11101011 >>> 3 == // 00011111 11111111 11111111 11111101`

- Source
- (source)

Implicitly added by int2long

Returns this value bit-shifted right by the specified number of bits,
filling in the left bits with the same value as the left-most bit of this.
The effect of this is to retain the sign of the value.

- Example
`-21 >> 3 == -3 // in binary: 11111111 11111111 11111111 11101011 >> 3 == // 11111111 11111111 11111111 11111101`

- Source
- (source)

Implicitly added by int2long

- Example
`-21 >> 3 == -3 // in binary: 11111111 11111111 11111111 11101011 >> 3 == // 11111111 11111111 11111111 11111101`

- Source
- (source)

@deprecated("Adding a number and a String is deprecated. Use the string interpolation `s\"$num$str\"`", "2.13.0")

Implicitly added by int2double

- Source
- (source)

Implicitly added by int2double

Returns

`true`

if this value is equal to x, `false`

otherwise.- Source
- (source)

Implicitly added by int2double

Returns

`true`

if this value is equal to x, `false`

otherwise.- Source
- (source)

Implicitly added by int2double

Returns

`true`

if this value is equal to x, `false`

otherwise.- Source
- (source)

Implicitly added by int2double

Returns

`true`

if this value is equal to x, `false`

otherwise.- Source
- (source)

Implicitly added by int2double

Returns

`true`

if this value is equal to x, `false`

otherwise.- Source
- (source)

Implicitly added by int2double

Returns

`true`

if this value is equal to x, `false`

otherwise.- Source
- (source)

Implicitly added by int2double

Returns

`true`

if this value is equal to x, `false`

otherwise.- Source
- (source)

Implicitly added by int2double

Returns

`true`

if this value is not equal to x, `false`

otherwise.- Source
- (source)

Implicitly added by int2double

Returns

`true`

if this value is not equal to x, `false`

otherwise.- Source
- (source)

Implicitly added by int2double

Returns

`true`

if this value is not equal to x, `false`

otherwise.- Source
- (source)

Implicitly added by int2double

Returns

`true`

if this value is not equal to x, `false`

otherwise.- Source
- (source)

Implicitly added by int2double

Returns

`true`

if this value is not equal to x, `false`

otherwise.- Source
- (source)

Implicitly added by int2double

Returns

`true`

if this value is not equal to x, `false`

otherwise.- Source
- (source)

Implicitly added by int2double

Returns

`true`

if this value is not equal to x, `false`

otherwise.- Source
- (source)

Implicitly added by int2double

Returns

`true`

if this value is less than x, `false`

otherwise.- Source
- (source)

Implicitly added by int2double

Returns

`true`

if this value is less than x, `false`

otherwise.- Source
- (source)

Implicitly added by int2double

Returns

`true`

if this value is less than x, `false`

otherwise.- Source
- (source)

Implicitly added by int2double

Returns

`true`

if this value is less than x, `false`

otherwise.- Source
- (source)

Implicitly added by int2double

Returns

`true`

if this value is less than x, `false`

otherwise.- Source
- (source)

Implicitly added by int2double

Returns

`true`

if this value is less than x, `false`

otherwise.- Source
- (source)

Implicitly added by int2double

Returns

`true`

if this value is less than x, `false`

otherwise.- Source
- (source)

Implicitly added by int2double

Returns

`true`

if this value is less than or equal to x, `false`

otherwise.- Source
- (source)

Implicitly added by int2double

Returns

`true`

if this value is less than or equal to x, `false`

otherwise.- Source
- (source)

Implicitly added by int2double

Returns

`true`

if this value is less than or equal to x, `false`

otherwise.- Source
- (source)

Implicitly added by int2double

Returns

`true`

if this value is less than or equal to x, `false`

otherwise.- Source
- (source)

Implicitly added by int2double

Returns

`true`

if this value is less than or equal to x, `false`

otherwise.- Source
- (source)

Implicitly added by int2double

Returns

`true`

if this value is less than or equal to x, `false`

otherwise.- Source
- (source)

Implicitly added by int2double

Returns

`true`

if this value is less than or equal to x, `false`

otherwise.- Source
- (source)

Implicitly added by int2double

Returns

`true`

if this value is greater than x, `false`

otherwise.- Source
- (source)

Implicitly added by int2double

Returns

`true`

if this value is greater than x, `false`

otherwise.- Source
- (source)

Implicitly added by int2double

Returns

`true`

if this value is greater than x, `false`

otherwise.- Source
- (source)

Implicitly added by int2double

Returns

`true`

if this value is greater than x, `false`

otherwise.- Source
- (source)

Implicitly added by int2double

Returns

`true`

if this value is greater than x, `false`

otherwise.- Source
- (source)

Implicitly added by int2double

Returns

`true`

if this value is greater than x, `false`

otherwise.- Source
- (source)

Implicitly added by int2double

Returns

`true`

if this value is greater than x, `false`

otherwise.- Source
- (source)

Implicitly added by int2double

Returns

`true`

if this value is greater than or equal to x, `false`

otherwise.- Source
- (source)

Implicitly added by int2double

Returns

`true`

if this value is greater than or equal to x, `false`

otherwise.- Source
- (source)

Implicitly added by int2double

Returns

`true`

if this value is greater than or equal to x, `false`

otherwise.- Source
- (source)

Implicitly added by int2double

Returns

`true`

if this value is greater than or equal to x, `false`

otherwise.- Source
- (source)

Implicitly added by int2double

Returns

`true`

if this value is greater than or equal to x, `false`

otherwise.- Source
- (source)

Implicitly added by int2double

Returns

`true`

if this value is greater than or equal to x, `false`

otherwise.- Source
- (source)

Implicitly added by int2double

Returns

`true`

if this value is greater than or equal to x, `false`

otherwise.- Source
- (source)

Implicitly added by int2double

Returns the remainder of the division of this value by

`x`

.- Source
- (source)

Implicitly added by int2double

Returns the remainder of the division of this value by

`x`

.- Source
- (source)

Implicitly added by int2double

Returns the remainder of the division of this value by

`x`

.- Source
- (source)

Implicitly added by int2double

Returns the remainder of the division of this value by

`x`

.- Source
- (source)

Implicitly added by int2double

Returns the remainder of the division of this value by

`x`

.- Source
- (source)

Implicitly added by int2double

Returns the remainder of the division of this value by

`x`

.- Source
- (source)

Implicitly added by int2double

Returns the remainder of the division of this value by

`x`

.- Source
- (source)

Returns the bitwise negation of this value.

- Example
`~5 == -6 // in binary: ~00000101 == // 11111010`

- Source
- (source)

- Source
- (source)

Returns this value bit-shifted left by the specified number of bits,
filling in the new right bits with zeroes.

- Example
`6 << 3 == 48 // in binary: 0110 << 3 == 0110000`

- Source
- (source)

@deprecated("shifting a value by a `Long` argument is deprecated (except when the value is a `Long`).\nCall `toInt` on the argument to maintain the current behavior and avoid the deprecation warning.", "2.12.7")

- Example
`6 << 3 == 48 // in binary: 0110 << 3 == 0110000`

- Source
- (source)

- Example
`21 >>> 3 == 2 // in binary: 010101 >>> 3 == 010`

`-21 >>> 3 == 536870909 // in binary: 11111111 11111111 11111111 11101011 >>> 3 == // 00011111 11111111 11111111 11111101`

- Source
- (source)

@deprecated("shifting a value by a `Long` argument is deprecated (except when the value is a `Long`).\nCall `toInt` on the argument to maintain the current behavior and avoid the deprecation warning.", "2.12.7")

- Example
`21 >>> 3 == 2 // in binary: 010101 >>> 3 == 010`

- Source
- (source)

- Example
`-21 >> 3 == -3 // in binary: 11111111 11111111 11111111 11101011 >> 3 == // 11111111 11111111 11111111 11111101`

- Source
- (source)

@deprecated("shifting a value by a `Long` argument is deprecated (except when the value is a `Long`).\nCall `toInt` on the argument to maintain the current behavior and avoid the deprecation warning.", "2.12.7")

- Example
- Source
- (source)

Returns the bitwise OR of this value and

`x`

.- Example
`(0xf0 | 0xaa) == 0xfa // in binary: 11110000 // | 10101010 // -------- // 11111010`

- Source
- (source)

Returns the bitwise OR of this value and

`x`

.- Example
`(0xf0 | 0xaa) == 0xfa // in binary: 11110000 // | 10101010 // -------- // 11111010`

- Source
- (source)

Returns the bitwise OR of this value and

`x`

.- Example
`(0xf0 | 0xaa) == 0xfa // in binary: 11110000 // | 10101010 // -------- // 11111010`

- Source
- (source)

Returns the bitwise OR of this value and

`x`

.- Example
`(0xf0 | 0xaa) == 0xfa // in binary: 11110000 // | 10101010 // -------- // 11111010`

- Source
- (source)

Returns the bitwise OR of this value and

`x`

.- Example
`(0xf0 | 0xaa) == 0xfa // in binary: 11110000 // | 10101010 // -------- // 11111010`

- Source
- (source)

Returns the bitwise AND of this value and

`x`

.- Example
`(0xf0 & 0xaa) == 0xa0 // in binary: 11110000 // & 10101010 // -------- // 10100000`

- Source
- (source)

Returns the bitwise AND of this value and

`x`

.- Example
`(0xf0 & 0xaa) == 0xa0 // in binary: 11110000 // & 10101010 // -------- // 10100000`

- Source
- (source)

Returns the bitwise AND of this value and

`x`

.- Example
`(0xf0 & 0xaa) == 0xa0 // in binary: 11110000 // & 10101010 // -------- // 10100000`

- Source
- (source)

Returns the bitwise AND of this value and

`x`

.- Example
`(0xf0 & 0xaa) == 0xa0 // in binary: 11110000 // & 10101010 // -------- // 10100000`

- Source
- (source)

Returns the bitwise AND of this value and

`x`

.- Example
`(0xf0 & 0xaa) == 0xa0 // in binary: 11110000 // & 10101010 // -------- // 10100000`

- Source
- (source)

Returns the bitwise XOR of this value and

`x`

.- Example
`(0xf0 ^ 0xaa) == 0x5a // in binary: 11110000 // ^ 10101010 // -------- // 01011010`

- Source
- (source)

Returns the bitwise XOR of this value and

`x`

.- Example
`(0xf0 ^ 0xaa) == 0x5a // in binary: 11110000 // ^ 10101010 // -------- // 01011010`

- Source
- (source)

Returns the bitwise XOR of this value and

`x`

.- Example
`(0xf0 ^ 0xaa) == 0x5a // in binary: 11110000 // ^ 10101010 // -------- // 01011010`

- Source
- (source)

Returns the bitwise XOR of this value and

`x`

.- Example
`(0xf0 ^ 0xaa) == 0x5a // in binary: 11110000 // ^ 10101010 // -------- // 01011010`

- Source
- (source)

Returns the bitwise XOR of this value and

`x`

.- Example
`(0xf0 ^ 0xaa) == 0x5a // in binary: 11110000 // ^ 10101010 // -------- // 01011010`

- Source
- (source)