When does the Constructor gets called in java?

前端 未结 10 1374
[愿得一人]
[愿得一人] 2020-12-16 02:14

When does the Constructor get called?

  1. Before object creation.
  2. During object creation.
  3. After object creation.
10条回答
  •  一生所求
    2020-12-16 03:16

    The object memory is allocated, the field variables with initial values are initialized, and then the constructor is called, but its code is executed after the constructor code of the object super class.

提交回复
热议问题