Java - Online Test - Var args - javasearch.buggybread.com


Share

Search Java Test Questions


 223 test questions in repository.




Java - Test Questions on 'Var args' - 2 questions found


Which of the following is false about var args ?Core Java
Var Args argument should have data type followed by three dots
Three dots should be consecutive and not separated by even space
We cannot have space before and after the dots
If there is a var args in the method, it should be only one and the last one.

  java  var args

Which of the following is not valid var args declaration ?Core Java
int sum (int... numbers)
int sum (.int .. numbers)
int sum (int ... numbers)
int sum (int x, int ... numbers)

  java  var args







comments powered by Disqus