Vidyalelo
Java Programming · Q115

Constructors and Methods

Programming · Java Programming · question 115

Q115

In the following Java code, which call to sum() method is appropriate? class Output public static int sum(int ...x) return; static void main(String args[]) sum(10); sum(10,20); sum(10,20,30); sum(10,20,30,40);

A.
only sum(10)
B.
only sum(10,20)
C.
only sum(10) & sum(10,20)
D.
all of the mentioned
Answer

Answer: Option D

Solution

Answer: Option D
No explanation is given for this question Let's Discuss on Board