πŸ“Š JAVA
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
πŸ’¬ Discuss
βœ… Correct Answer: (D) all of the mentioned

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
118
Total Visits
πŸ“½οΈ
1 y ago
Published
πŸŽ–οΈ
Shiva Ram
Publisher
πŸ“ˆ
80%
Success Rate