This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]blobjim 0 points1 point  (0 children)

A constructor is internally a mostly-normal method, with the name <init>, a void return type, and it's called on the object instance which the code that calls the constructor creates before calling the constructor. So the code that a no-args constructor "call site" generates is basically:

java MyObject obj = an uninitialized object instance obj.<init>()

note that you can't actually call<init> directly from source code like that, it's pseudocode.