014-006-007
Field Access with super.
Easy
Problem Description
Field Access with super.
Learning Objective: Understand how to explicitly access parent class fields using super.
Overview
Create a program that uses super. to access parent class field when child class has a field with the same name.
Specifications
- Define protected String value = "Base Value" in Base class
- Derived class extends Base and defines same-named value = "Derived Value"
- Create showValues() method in Derived to output both values
Output Format
This value: Derived Value
Super value: Base Value
Ready to Try Running Code?
Log in to access the code editor and execute your solutions for this problem.
Don't have an account?
