Whenever we don't pass any argument to java program but we didn't get error because an array of string is always a parameter which main program receives.when we don't pass anything array of string will be there always but this time length of array of string will be zero.
public static void main(String[] args) {
if (args.length == 0) {
System.out.println("No cmd parameters passed");
}
}
here array of string args is passed and when we pass nothing, length of args is zero but args is passed.