Complete the code to increment the variable count by 1 using a unary operator.
int count = 5; count[1];
++ increases the value of count by 1.Complete the code to negate the boolean variable isActive using a unary operator.
boolean isActive = true;
isActive = [1]isActive;! negates a boolean value.Fix the error in the code by choosing the correct unary operator to decrement num by 1.
int num = 10; num[1];
-- decreases the value of num by 1.Fill both blanks to create a map of numbers to their negations using unary operators.
Map<Integer, Integer> negations = Map.of(1, [1]1, 2, [2]2);
- negates numbers, turning positive to negative.Fill all three blanks to create a map where keys are numbers and values are their incremented, negated, and decremented forms respectively.
int one = 1, two = 2, three = 3; Map<Integer, Integer> results = Map.of( one, [1]one, two, [2]two, three, [3]three);
++ to increment, - to negate, and -- to decrement the numbers.