Block Memorization Flashcards

1
Q

Constructor Rules: 1/5

A

The first statement of every constructor is a call to another constructor within the class using this(), or a call to a constructor in the direct parent class using super().

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Constructor Rules: 2/5

A

The super() call may not be used after the first statement of the constructor.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Constructor Rules: 3/5

A

If no super() call is declared in a constructor, Java will insert a no-argument super() as the first statement of the constructor.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Constructor Rules: 4/5

A

If the parent lacks a no argument constructor and the child doesn’t define any constructors, the compiler will through an error as it tries to insert a default no-argument super() constructor in the child class.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Constructor Rules: 5/5

A

If the parent doesn’t have a no0argument constructor, the compiler requires an explicit call to a parent constructor in each child constructor.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly