Java inheritance joke. When you create a child-class object, its constructor calls the parent constructor via super(). Basically, child canβt exist without getting the dad involved lol.
I'm pretty sure in C++ a child class does not automatically call its super class's constructor unless the child itself does not define one, in which case it calls the parent's default constructor (i.e. Parent() ). If parent does not have a default constructor, it throws a compile time error.
67
u/tkb_onions Sep 09 '26
super() joke π
19
u/Mordret10 Sep 09 '26
Base(d)
11
u/isr0 Sep 09 '26
Did you meet uncle mixin?
1
u/ljfa2 Sep 09 '26
my (constructor) body is flexible though
0
u/Symphonic_nerve Sep 09 '26
π
0
u/[deleted] Sep 09 '26
[deleted] β view deleted comment
0
u/[deleted] Sep 09 '26
[deleted] β view deleted comment