A sub (child) class can access a private variable of its super ( parent ) class . True or false
Added by Aitor F.
Step 1
In many programming languages, access modifiers like private, protected, and public determine the visibility of class members (variables and methods). Show more…
Show all steps
Your feedback will help us improve your experience
Rashmi Prakash and 55 other AP CS educators are ready to help you.
Ask a new question
Labs
Want to see this concept in action?
Explore this concept interactively to see how it behaves as you change inputs.
Key Concepts
Recommended Videos
True or false? A derived class is a subset of a base class.
Rashmi P.
Consider the following code: public class A1 { public int x; private int y; … } public class A2 extends A1 { public int a; private int b; … } public class A3 extends A2 { private int q; … } Which of the following is true regarding the use of instance variable y in class A1? It is directly accessible only in A1 It is directly accessible only in A3 It is directly accessible in A1 and A2 It is directly accessible in A1, A2, and A3 It is not directly accessible in any of the three classes
James K.
A class is an object. True or False?
Recommended Textbooks
Computer Science and Information Technology
Introduction to Programming Using Python
Computer Science - An Overview
Transcript
18,000,000+
Students on Numerade
Trusted by students at 8,000+ universities
Watch the video solution with this free unlock.
EMAIL
PASSWORD