Constructor body


Source code

1class ConstructorBody extends java.lang.AssertionError {
2
3 ConstructorBody(int param) {
4 }
5
6 ConstructorBody(char param) {
7 super(param);
8 }
9
10}

Bytecode


Comment

If a constructor body does not begin with an explicit constructor invocation, then the constructor body implicitly begins with a superclass constructor invocation "super();", even if superclass has constructor with the same signature.

Java compiler version: 21
Other examples
Main page