Java - Online Test - Var args - javasearch.buggybread.com
OCJP / SCJP
New in Java 8
Java 8 Lambda
Java 8 java.time
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 ?
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.
Which of the following is not valid var args declaration ?
int sum (int... numbers)
int sum (.int .. numbers)
int sum (int ... numbers)
int sum (int x, int ... numbers)
comments powered by Disqus.
comments powered by