A

Admin • 825.56K Points
Coach

Q. 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
  • Correct Answer - Option(D)
  • Views: 12
  • Filed under category Java
  • Hashtags:

No solution found for this question.
Add Solution and get +2 points.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.