Which of the following is not a true statement?
super()
command. A.
Option A is the correct answer because the first line of a constructor could be this()
or super()
, making it an untrue statement.
Option B is a true statement because the compiler will insert the default no-argument constructor if one is not defined.
Option C is also a true statement, since zero or more arguments may be passed to the parent constructor, if the parent class defines such constructors.
Option D is also true. The value of a final instance variable should be set when it is declared, in an initialization block, or in a constructor.