Page 1 of 1

[HD-OCP17/21-Fundamentals Pg 347, Sec. 13.4.3 - invalid-overrides]

Posted: Thu Sep 26, 2024 7:02 am
by raphaelzintec
here error in pdf

static void initialize(){} // will not compile because overriding method is static

replace with

static void initialize(){} // will not compile because overriding method is instance

Re: [HD-OCP17/21-Fundamentals Pg 347, Sec. 13.4.3 - invalid-overrides]

Posted: Thu Sep 26, 2024 8:39 pm
by admin
No, it is correct. The overriding method is indeed static.
But it would be more clear if it said,
static void initialize(){} //will not compile because the overridden method is instance.

Re: [HD-OCP17/21-Fundamentals Pg 347, Sec. 13.4.3 - invalid-overrides]

Posted: Fri Sep 27, 2024 5:06 am
by raphaelzintec
yes you are right!