Java / Methods
When no command line arguments are passed, does the String array parameter of main() method be null?
It is an empty Array with zero elements and not null.
public class MainMethodClass { public static void main(String[] args) { System.out.println("Size of the Arg Array=" + args.length); } }
Output: 0
More Related questions...