Fiserv Interview Question

Second highest salary from array with 3 types of logic using java