← All tasks
🔍
Programming Advanced

Fix Incorrect Use of self:: for Overridable Behavior

⏱ 5 min ⭐ 120 XP 🔁 3 attempts allowed

What you'll do

Find the line where self:: should be static:: to support late static binding in a subclass override.

Scenario

A subclass overrides make(), but calling ParentClass::create() still uses the parent's make() instead of the subclass's.

Ready to try it?

Create a free account and try "Fix Incorrect Use of self:: for Overridable Behavior" free for 7 days, no card required. Earn 120 XP and track your internship progress.

Already have an account? Sign in