I am confused whether the compiler inserts the default constructor during compile time or JVM provides the default constructor during run time?
Asked
Active
Viewed 126 times
0
-
If you don’t implement any constructor in your class, the Java compiler inserts default constructor into your code on your behalf. You will not see the default constructor in your source code(the .java file) as it is inserted during compilation and present in the bytecode(.class file).https://beginnersbook.com/2014/01/default-constructor-java-example/ – pavithraCS Apr 06 '22 at 03:09
-
1The question was answered here https://stackoverflow.com/questions/66717422/what-is-responsible-for-generating-the-default-constructor – goooooooo Apr 06 '22 at 03:11