+ 1
Can parameters passed to the main function be empty?
4 ответов
+ 1
Yes.
0
yes
0
then whats the use of it ??? zen !!
0
Yes, obviously. But, for a stand-alone JAVA program to compile, you need to have:
public static void main(String[] args)
or
public static void main(String args[])
where you may give any valid variable instead of 'args' ...
Any other method with the name 'main()' can be inside your code with or without parameters, but that will become overloading of the main method !!!