1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
dolphi86 [110]
3 years ago
15

Which of the following is true regarding the use of instance variable j in class B1?

Computers and Technology
1 answer:
melisa1 [442]3 years ago
6 0

Answer: A) It is directly accessible only in B1

Explanation: In the given chunk of code, Class B1 is a base class. Class B2 is derived class of class B1. Class B3 is derived class of B2. As you can see class B1 has two members or instance variables i and j. Instance variable cannot be directly accessible by both B2 and B3. If you see this statement of the given code  private int j; the keyword private is used with the variable j. This keyword is called access specifier. Access specifiers specifies how the members of a class can be accessed. These members are attributes and methods of that class. Any member of a class that are declared private cannot be inherited by derived classes of that class.  Additionally these private members cannot be accessed from within any method inside derived class. So j is directly accessible only in B1. You can access a private instance variable from within the same class or can access  it through the methods of class.

You might be interested in
One way bloggers decide how to present information is by understanding
PSYCHO15rus [73]

I would say strong use of multimedia.

4 0
3 years ago
Read 2 more answers
How do I do a PowerPoint
kirill115 [55]
It is like this: . You just put a circle and that is a power point
4 0
3 years ago
Read 2 more answers
Drag the words into the correct boxes
tresset_1 [31]

Explanation:

if you have any doubts or queries regarding the answer please feel free to ask

4 0
2 years ago
Vẽ sơ đồ lắp đặt gồm 2 cầu chì, 1 ổ điện, 2 cực điều khiển 2 đèn mắc song song
Nookie1986 [14]

Answer:

okokikhjhghjjjkkkkkokoloo

7 0
2 years ago
Which of the following is not hardware? Question 7 options: A) Wireless network router B) Printer C) Virus Scanner D) Flat-panel
jok3333 [9.3K]

the answer is virus scanner which is not hardware but software because if you didn't know hardware is stuff like a monitor a mouse a battery a case that's all stuff you can generally touch even the hardware inside the computer you can touch where as virus scanner you can not touch because its software again my point being its software NOT hardware

8 0
3 years ago
Other questions:
  • A job posting is the best way to find out what _____ are required for a position.A.aptitudes B.hard skills C.soft skills D.dress
    10·2 answers
  • A tablet computer transmits a file over a wi-fi link to an access point.
    13·1 answer
  • Which of the following is the best name for a history report about world war 1
    7·1 answer
  • Which of the following represent features of free software licensing? Check all of the boxes that apply.
    10·1 answer
  • What do you do when you have computer problems? Check all that apply. PLEASE HELP
    9·2 answers
  • What is the full meaning of Internet and WiFi
    6·2 answers
  • How do computer users benefit from the increased speed?
    9·1 answer
  • How do you enlarge an image to see more detail on it? (1 point)
    14·2 answers
  • Social media first became popular due to which development?
    8·1 answer
  • Imagine an everyday scenario in which you are using the internet: downloading a file, uploading a photo, checking your email, et
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!