This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | Next revisionBoth sides next revision | ||
dev:crosscompiler:class_initialization [2015/04/06 13:37] – [Initialisierung von Objekten] ursgraf | dev:crosscompiler:class_initialization [2015/04/06 13:37] – [Initialization of Objects] ursgraf | ||
---|---|---|---|
Line 50: | Line 50: | ||
} | } | ||
</ | </ | ||
- | In the Bytecode these constructors carry the name /init// and vary in the parameter list. Block 1 and block 2 in the above code block will be combined in //init//. | + | In the Bytecode these constructors carry the name //init// and vary in the parameter list. Block 1 and block 2 in the above code block will be combined in //init//. |
When creating an object a call to //new// allocates a block on the heap. Next, the constructor of the super class is called (which itself calls its super class constructor). These calls can be found in the Bytecode. | When creating an object a call to //new// allocates a block on the heap. Next, the constructor of the super class is called (which itself calls its super class constructor). These calls can be found in the Bytecode. | ||
Classes might also have instance initializers, | Classes might also have instance initializers, |