We can not write main() method without String args[]. the code will compile but JVM(Java virtual machine) cannot recognize the main() method as the method from where it should start execution of the java program. JVM(Java virtual machine) always looks for main() method with string type array as parameter.
Search program
Friday, 12 April 2013
can we write main() method without String args[] ?
We can not write main() method without String args[]. the code will compile but JVM(Java virtual machine) cannot recognize the main() method as the method from where it should start execution of the java program. JVM(Java virtual machine) always looks for main() method with string type array as parameter.
Labels:
simple core java
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment