You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
int array 10 = 0;
int currentIndex = 0;
int currentValue = 5;
# Value of array at index 0 will equal 5 after assignment.
array[0] = array[currentIndex] + currentValue;
Bitwise left shift example
int MULTIPLIER = 200 << 24;
int shiftResult = (16 * 8) << 4;
Bitwise right shift example
int RIGHT_MULTIPLIER = -200 >> 24;
int secondShift = (32 / 2) >> 16;
Multiplication example
int area = 5 * 5;
Division example
int perimeter = 250 / 25;
Remainder example
int remainder = 1050 % 6;
Addition example
int sum = 5 + 25 + 125;
Subtraction example
int difference = 1000 - 100 - 10;
Bitwise OR example
# orResult equals 248 after assignment.
int orResult = 72 | 184;
Bitwise AND example
# andResult equals 8 after assignment.
int andResult = 72 & 184;
Bitwise XOR example
# xorResult equals 159 after assignment.
int xorResult = 31 ^ 128;
Binary ones complement example
# onesComplementResult equals -51 after assignment.
int onesComplementResult = 0 ~ 50;
Unsigned right shift example
# unsignedRightShiftResult equals 30 after assignment.
int unsignedRightShiftResult = 123 >>> 2;