Answer:
Following are the expression to this question:
return values.remove() + values.remove();
Step-by-step explanation:
function definition can be described as follows:
- In the given method definition a method "sumTwoLowestElements" is declared, which accepts a single-dimensional integer array in method parameters.
- Inside the method, "PriorityQueue" class object "values" is created, that uses a for loop, inside the loop an integer variable "num" is declared, that holds array value.
- In the loop a class object uses add method, which is an inbuilt method, that adds all array values and outside the loop, a remove method is used that first selects two values then a remove from the return value.