Instance initializers are executed from top to bottom. That means that this line:
Executes prior to this line:
Therefore, i is being assigned the value of j before j has been assigned a value. By default, j is 0 prior to its initialization so that, 0, is what is assigned to i.
You can find complete details about object initialization in the JLS,
§12.5 Creation of New Class Instances.