Originally posted by amal shah:
so passing the this reference as in line 1 is equivalent to constructing an object of the Main class.
In short this when passed,internally creates object of the class..is this conclusion correct...
Not quite correct.
When you use "this", you are NOT creating a new object, it uses the object that is already created.
Actually, you're code will never run properly, as you'll get a StackOverflowError. What happens is the following:
1) You create an instance of Main manually.
2) The Main() constructor runs.
3) The Main() constructor creates another instance of Main on // line 2
4) Go to step 2.