Java - Methods and Code Reusability
Given this class, what will obj.process(10, 20, 30) print?
class Processor {
void process(int a, int b) { System.out.println("Two ints: " + (a+b)); }
void process(int a, int b, int c) { System.out.println("Three ints: " + (a+b+c)); }
void process(int... nums) { System.out.println("Varargs sum: " + java.util.Arrays.stream(nums).sum()); }
}
Processor obj = new Processor();