Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
If varargs is passed to the method (the example is stealthy above)
public static void main(Object... args) {
System.out.println(args.length);
}
First, there are no functions in Java, only methods. Secondly, Java is a language with static typing, which means that even before compilation it is known how many parameters a method has and what types they are.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question