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
Darla is going to start writing the HTML code for a web page. What would she
Stels [109]

Answer:

(C) Opening Tag

Explanation:

HTML code is contained in an opening and closing tag. To start writing code you need to first type in the opening tag.

7 0
3 years ago
Read 2 more answers
When operating a forklift, you should always maintain what kind of speed? A. High Speed B. Low Speed C. Medium Speed
timurjin [86]
Low speed unless you want your crates or boxes to fall
5 0
3 years ago
Jamie is writing an investigative report with footnotes
xxTIMURxx [149]

Answer:

????

Explanation:

does she need help with the footnotes?

7 0
3 years ago
Read 2 more answers
Which tab in MS Word would you select to insert a shape into a document? Question 6 options: Insert Review View File
lana [24]

Answer:

Insert

Explanation:

Under the insert tab, shapes will be an option to put in under the illustrations category.

4 0
3 years ago
Read 2 more answers
What is another term for online data storage?
Aloiza [94]
Cloud storage, meaning storage own by someone else like Google drive
3 0
3 years ago
Other questions:
  • Which is the responsibility of a software architect?
    11·1 answer
  • Complete the function ConvertToDecadesAndYears to convert totalYears to decades and years. Return decades and years using the Ti
    10·1 answer
  • Quien invento el primer vehiculo con motor?
    15·2 answers
  • 12. Which of the following is CourseBit®? (1 point)
    6·1 answer
  • Which of the following functions needed to implement the information security program evaluates patches used to close software v
    5·1 answer
  • When your hands are on home row, your left hand rests lightly on _____. J K L ; A S D F Z X C V Q W E R'
    11·1 answer
  • Uploading Your Work
    14·1 answer
  • Can anyone help me with these assignments??? Hands On Assignments- Insertion of Symbols, Special Characters, and Images.... and
    9·1 answer
  • How to paste picture in word without moving table.
    12·1 answer
  • What is the chip that allows the screen to work
    14·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!