Question 1
Consider the Java code given below that prints the maximum element of a set. From among the options, identify the appropriate function header for function findMax that takes as input a set of numbers and prints the maximum element of the set.
import java.util.*;class Test { // FUNCTION HEADER for function findMax { // Prints the maximum element of the set }
public static void main(String[] args) { Set<Integer> s = new HashSet<>(); s.add(12); s.add(23);
Set<Double> s1 = new HashSet<>(); s1.add(12.2); s1.add(23.4);
findMax(s); findMax(s1); }}Choose the correct option(s)
