[JAVA] Instance creation, constructor, field, etc.

Instance creation (at the time of new) ① Field initialization ② Call the constructor

Aaa o = new Bbb(100); When creating such an instance, jump to the constructor of Bbb class

System.out.println(o.a); In case of field, jump to the field of Aaa class which is type

o.sample() When the method is called, it jumps to the method of Bbb which is an object.

Recommended Posts

Instance creation, constructor, field, etc.
[Java] Instance method, instance field, class method, class field, constructor summary
Java-Class Instance Creation Part.1
Java-Class Instance Creation Part.2
[Ruby] methods, instance methods, etc ...
Java-Class Instance Creation Part.3
Java-Class Instance Creation Part.4
[Ruby] Class methods, instance methods, etc.
[Ruby] Classes, instance variables, instances, etc ...