Why can’t I refer to an instance method while explicitly invoking a constructor?

Non-static methods are instance methods. This are only accessible in existing instance, and instance does not exist yet when you are in constructor (it is still under construction).

Why it is so? Because instance methods can access instance (non-static) fields, which can have different values in different instances, so it doesn’t make sense to call such method on something else than existing, finished instance.

Leave a Comment