Multiple choice technology programming languages

Can we declare derived class first and then base class in java?

  1. True

  2. False

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

In Java, the base class must be declared before the derived class, or at least be available to the compiler. The compiler needs to know the base class's structure to process inheritance syntax and verify that methods and fields used in the derived class are valid.