SAP Certified Associate Back End Developer ABAP Cloud · Free Practice Question Medium
Question 4
Given this code:
- DATA: go_super TYPE REF TO lcl_super,
- go_sub TYPE RFF TO lcl_sub.
- go_sub = NEW #( ... ).
- go_super = go_sub.
with lcl_super being superclass of lcl_sub.
When accessing the subclass instance through go_super, what can you do? Note: There are 2 correct answers to this question.
-
A
Access the inherited private components.
-
B
Call inherited public redefined methods.
-
C
Call a subclass specific public method.
-
D
Access the inherited public components.
Reveal correct answers
Correct answers: B, D
Discussion
Think the marked answer is wrong, or have a better explanation? Share it below — comments appear after review.
You must be logged in to post a comment.
