Please explain in detail
Hi Please find the answers below: 1.Explain Java main method?
Please find complete explanation in following video : https://www.youtube.com/watch?v=Z7rPNwg-bfk&feature=youtu.be
2.Why main is always public in Java?
So that main can be accessed by JVM. 3.why main is always static? at RunTime JVM do not create any object and static method can be accessed by class name, so main is always static. 4.why main always accepts String array as argument? it is a command line argument and any data type can be converted to string just by putting it in double quotes, so string is used. 5.can we overload main method in java? Yes 6. can we override main method in java? No Static methods can not be overridden.