true
if this value is not equal to x, false
otherwise
true
if this value is not equal to x, false
otherwise
true
if this value is not equal to x, false
otherwise
true
if this value is not equal to x, false
otherwise
true
if this value is not equal to x, false
otherwise
true
if this value is not equal to x, false
otherwise
true
if this value is not equal to x, false
otherwise
the remainder of the division of this value by x
the remainder of the division of this value by x
the remainder of the division of this value by x
the remainder of the division of this value by x
the remainder of the division of this value by x
the remainder of the division of this value by x
the remainder of the division of this value by x
the bitwise AND of this value and x
(0xf0 & 0xaa) == 0xa0 // in binary: 11110000 // & 10101010 // -------- // 10100000
the bitwise AND of this value and x
(0xf0 & 0xaa) == 0xa0 // in binary: 11110000 // & 10101010 // -------- // 10100000
the bitwise AND of this value and x
(0xf0 & 0xaa) == 0xa0 // in binary: 11110000 // & 10101010 // -------- // 10100000
the bitwise AND of this value and x
(0xf0 & 0xaa) == 0xa0 // in binary: 11110000 // & 10101010 // -------- // 10100000
the bitwise AND of this value and x
(0xf0 & 0xaa) == 0xa0 // in binary: 11110000 // & 10101010 // -------- // 10100000
the product of this value and x
the product of this value and x
the product of this value and x
the product of this value and x
the product of this value and x
the product of this value and x
the product of this value and x
the sum of this value and x
the sum of this value and x
the sum of this value and x
the sum of this value and x
the sum of this value and x
the sum of this value and x
the sum of this value and x
the difference of this value and x
the difference of this value and x
the difference of this value and x
the difference of this value and x
the difference of this value and x
the difference of this value and x
the difference of this value and x
the quotient of this value and x
the quotient of this value and x
the quotient of this value and x
the quotient of this value and x
the quotient of this value and x
the quotient of this value and x
the quotient of this value and x
true
if this value is less than x, false
otherwise
true
if this value is less than x, false
otherwise
true
if this value is less than x, false
otherwise
true
if this value is less than x, false
otherwise
true
if this value is less than x, false
otherwise
true
if this value is less than x, false
otherwise
true
if this value is less than x, false
otherwise
this value bit-shifted left by the specified number of bits, filling in the new right bits with zeroes.
6 << 3 == 48 // in binary: 0110 << 3 == 0110000
this value bit-shifted left by the specified number of bits, filling in the new right bits with zeroes.
6 << 3 == 48 // in binary: 0110 << 3 == 0110000
true
if this value is less than or equal to x, false
otherwise
true
if this value is less than or equal to x, false
otherwise
true
if this value is less than or equal to x, false
otherwise
true
if this value is less than or equal to x, false
otherwise
true
if this value is less than or equal to x, false
otherwise
true
if this value is less than or equal to x, false
otherwise
true
if this value is less than or equal to x, false
otherwise
true
if this value is equal x, false
otherwise
true
if this value is equal x, false
otherwise
true
if this value is equal x, false
otherwise
true
if this value is equal x, false
otherwise
true
if this value is equal x, false
otherwise
true
if this value is equal x, false
otherwise
true
if this value is equal x, false
otherwise
true
if this value is greater than x, false
otherwise
true
if this value is greater than x, false
otherwise
true
if this value is greater than x, false
otherwise
true
if this value is greater than x, false
otherwise
true
if this value is greater than x, false
otherwise
true
if this value is greater than x, false
otherwise
true
if this value is greater than x, false
otherwise
true
if this value is greater than or equal to x, false
otherwise
true
if this value is greater than or equal to x, false
otherwise
true
if this value is greater than or equal to x, false
otherwise
true
if this value is greater than or equal to x, false
otherwise
true
if this value is greater than or equal to x, false
otherwise
true
if this value is greater than or equal to x, false
otherwise
true
if this value is greater than or equal to x, false
otherwise
this value bit-shifted left by the specified number of bits, filling in the right bits with the same value as the left-most bit of this. The effect of this is to retain the sign of the value.
-21 >> 3 == -3 // in binary: 11111111 11111111 11111111 11101011 >> 3 == // 11111111 11111111 11111111 11111101
this value bit-shifted left by the specified number of bits, filling in the right bits with the same value as the left-most bit of this. The effect of this is to retain the sign of the value.
-21 >> 3 == -3 // in binary: 11111111 11111111 11111111 11101011 >> 3 == // 11111111 11111111 11111111 11111101
this value bit-shifted right by the specified number of bits, filling the new left bits with zeroes.
-21 >>> 3 == 536870909 // in binary: 11111111 11111111 11111111 11101011 >>> 3 == // 00011111 11111111 11111111 11111101
21 >>> 3 == 2 // in binary: 010101 >>> 3 == 010
this value bit-shifted right by the specified number of bits, filling the new left bits with zeroes.
-21 >>> 3 == 536870909 // in binary: 11111111 11111111 11111111 11101011 >>> 3 == // 00011111 11111111 11111111 11111101
21 >>> 3 == 2 // in binary: 010101 >>> 3 == 010
the bitwise XOR of this value and x
(0xf0 ^ 0xaa) == 0x5a // in binary: 11110000 // ^ 10101010 // -------- // 01011010
the bitwise XOR of this value and x
(0xf0 ^ 0xaa) == 0x5a // in binary: 11110000 // ^ 10101010 // -------- // 01011010
the bitwise XOR of this value and x
(0xf0 ^ 0xaa) == 0x5a // in binary: 11110000 // ^ 10101010 // -------- // 01011010
the bitwise XOR of this value and x
(0xf0 ^ 0xaa) == 0x5a // in binary: 11110000 // ^ 10101010 // -------- // 01011010
the bitwise XOR of this value and x
(0xf0 ^ 0xaa) == 0x5a // in binary: 11110000 // ^ 10101010 // -------- // 01011010
Returns the runtime class representation of the object.
this value, unmodified
the negation of this value
the bitwise negation of this value
~5 == -6 // in binary: ~00000101 == // 11111010
the bitwise OR of this value and x
(0xf0 | 0xaa) == 0xfa // in binary: 11110000 // | 10101010 // -------- // 11111010
the bitwise OR of this value and x
(0xf0 | 0xaa) == 0xfa // in binary: 11110000 // | 10101010 // -------- // 11111010
the bitwise OR of this value and x
(0xf0 | 0xaa) == 0xfa // in binary: 11110000 // | 10101010 // -------- // 11111010
the bitwise OR of this value and x
(0xf0 | 0xaa) == 0xfa // in binary: 11110000 // | 10101010 // -------- // 11111010
the bitwise OR of this value and x
(0xf0 | 0xaa) == 0xfa // in binary: 11110000 // | 10101010 // -------- // 11111010
Short
, a 16-bit signed integer (equivalent to Java'sshort
primitive type) is a subtype of AnyVal. Instances ofShort
are not represented by an object in the underlying runtime system.There is an implicit conversion from Short => RichShort which provides useful non-primitive operations.