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
Software is the brain of computer. Explain this starement
Annette [7]

here you go

i hope this helps you

5 0
3 years ago
When you use a rest area, you should:
I am Lyosha [343]
The answer would be A.
The rest seem impractical.
7 0
3 years ago
Read 2 more answers
Which function prompts the user to enter information?
Rzqust [24]

Answer:

input() prompts the user to enter information

6 0
3 years ago
Read 2 more answers
Your organization has hired a penetration tester to validate the security of your environment. The penetration tester needs to d
yulyashka [42]

Answer:

Port scanner

Explanation:

The penetration tester would most likely use a port scanner. A port scanner can be explained to be an application that is made to check a server or host for ports that are open. This application can also be used by administrators to check their security networks so as to know those network services that are running on a host and also to know existing vulnerabilities. Attackers also use this to exploit victims.

5 0
3 years ago
What is the famous saying among computer programmers that refers to the fact that computers cannot tell the difference between g
jek_recluse [69]

Answer:

Garbage in, garbage out

Explanation:

Garbage in, garbage out is the famous saying among computer programmers that incorrect, poor-quality, flawed, or nonsense input will produce incorrect, poor-quality, flawed, or nonsense output while correct, good quality or valuable input will produce correct, good quality or valuable output. it is basically saying that computers cannot tell the difference between good and bad data.

7 0
3 years ago
Read 2 more answers
Other questions:
  • A block style business letter is:
    5·1 answer
  • Who are the founders of Microsoft?
    5·1 answer
  • PowerPoint provides a wide variety of predefined shapes that can add visual insert to a slide true or false
    10·2 answers
  • The CUSTOMERS and SALES tables contain these columns:
    6·1 answer
  • What does the binary odometer show about representing large numbers?
    8·1 answer
  • What does the top level domain in a url inducate? A. The organization or company that owns the website. B. The organization or c
    6·2 answers
  • Please help me with Excel!!! A lot of points!
    11·1 answer
  • A debate about city schools are more better than village schools​
    8·1 answer
  • Please answer fast..​
    15·1 answer
  • Choose 2 statements that correctly describe the time complexity of data structures with N data.
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!