In Java why we write public static void main(String args[])
why not main()?

Answer Posted / guest

main() will be treated as just another method.
but public static void main(String args[])
is treated as entry point of an java application

Is This Answer Correct ?    2 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the types of arrays in java?

561


What are class members by default?

663


What is ternary operator? Give an example.

603


What is the static block?

585


What is a java list?

587






What are the legal operands of the instanceof operator?

566


Does java vector allow null?

544


What is ternary operator in java?

596


What is the difference between checked exception and unchecked exception?

530


Where is const variable stored?

536


What is the use of object and class classes?

569


Which is the class in java?

521


What is the difference between exception and error in java?

493


What is Gang of four design patterns

596


What are the differences between this and super keyword?

532