Math, asked by rohit54369582, 8 hours ago

which of the following can be used if the number of arguments passed to a method are of same data type, but the number of arguments is unknown?

Answers

Answered by jaya8765
0

Answer:

If the number of arguments passed to a method are of same data type, but the number of arguments is called Varargs.

Step-by-step explanation:

  • A technique that takes a variable number of arguments is called a variable-arity method, or simply a Varargs method.
  • Varargs exists a brief name for variable arguments.
  • In Java, an argument of a technique can handle an arbitrary number of values. This argument that can accept the variable number of values is called Varargs.
  • Varargs can be helpful in some circumstances. However, if you are certain regarding the number of arguments passed to a technique, use technique overloading instead.
Answered by GeniusGirl19
0

Answer:

If the number of arguments passed to a method are of same data type, but the number of arguments is called Varargs.

Step-by-step explanation:

  • A technique that takes a variable number of arguments is called a variable-arity method, or simply a Varargs method.
  • Varargs exists a brief name for variable arguments.
  • In Java, an argument of a technique can handle an arbitrary number of values. This argument that can accept the variable number of values is called Varargs.
  • Varargs can be helpful in some circumstances. However, if you are certain regarding the number of arguments passed to a technique, use technique overloading instead.

#SPJ2

Similar questions