Which method declarations, when inserted at (1), will not cause the program to fail during compilation?
public class Main { public long sum(long a, long b) { return a + b; } // (1) INSERT CODE HERE. }
Select the two correct answers.
sum()
;(a) and (e)
Declaration (b) fails, since the method signature only differs in the return type.
Declaration (c) fails, since it tries to declare an abstract method in a non-abstract class.
Declaration (d) fails, since its signature is identical to the existing method.