This question arised because of my lack of understanding of the basic principles of java execution. To the best of my knowledge main() is the entry point of a java program, and anything inside a method is to be executed by the JVM, please correct me if im wrong. In the following program
the code for the object is placed outside the main method, or any method. So does that line of code get executed, is an object created when i run this program, or is it not created because i placed the code outside the main method? thank you.