Yahoo Interview Question
Software Engineer / DevelopersCountry: United States
Interview Type: Phone Interview
public indicates that the main() method can be called by any object.
static indicates that the main() method is a class method.
void indicates that the main() method has no return value.
public : its public you can call it from anywhere
- Kapil.smart1709 August 16, 2012static : without creating object you can call the method, so JVM can call this
void : return type of main is void means main is not returning anything to JVM
main : it is the method name