Multiple choice technology programming languages

In derived classes, in what order are the constructors called?

  1. from base to the derived class

  2. from derived to base

  3. only the derived class

  4. only the base class

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

In Java, constructor execution flows from base class to derived class. The base class constructor completes first to initialize inherited fields, then derived class constructors run. B is backwards, C and D are incomplete.