everything has to be inside a class including main method also so it is always inside a class
It is complete Object-oriented language hence every function even main should be declared in class.....
Main is the entry point of the program