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
maksim [4K]
3 years ago
4

Public class A1 { public int x; private int y; protected int z; ... } public class A2 extends A1 { protected int a; private int

b; ... } public class A3 extends A2 { private int q; ... } Which of the following lists of instance data are accessible in class A2?
1. a, b
2. x, y, z, a, b
3. x, z, a, b
4. x, y, z, a
5. z, a, b
Mathematics
1 answer:
bija089 [108]3 years ago
6 0

Answer:

The correct option is option 3.

Step-by-step explanation:

The public variable is accessible to all the classes

A private variable is accessible to only the class in which it is defined

A protected variable is accessible in the defining and derived classes

Now as the class A2 is under consideration, so the two variables which are defined in A2 are both accessible by A2 which are the protected int a and the private int b.

Now for the other variables, public int x is accessible to all the classes as it is a public variable.

Private int y is defined in class A1 so it is not accessible to class A2.

Protected int z is defined in class A1 but A2 is derived from A1 thus this is also accessible by A2.

Private int q is defined in class A3 so it is not accessible to class A2.

Thus a,b,x and z are the four variables accessible by the class A2 sso option 3 is the correct option.

You might be interested in
- 21-p-11)<br><br> Giving branliest
posledela

Answer:

-32-p

Step-by-step explanation:

you combine the like terms which would be -21 and -11. that gives you -32 and -p is just by its self since there are no terms to combine it with

6 0
3 years ago
Find the solution of w(-15-w)=0
inna [77]

Answer:

w(-15-w)= 0

w= 0 or (-15-w) = 0

Now,

-15-w =0

w= -15

So,The solution of w(-15-w) = 0

w= 0, -15

5 0
3 years ago
Read 2 more answers
A town has a population of 17000 and grows at 3% every year. What will be the population after 7 years, to the nearest whole num
Pepsi [2]

Answer:

122570


(17000*1.03)7


4 0
3 years ago
Read 2 more answers
Dalvin has a toy car collection of 200 toy cars. He keeps 194 of the toy cars on his wall. What percentage of Dalvin's toy car c
aleksklad [387]

Answer: 97%

Step-by-step explanation:

what is 194 out of 200 ? 97%

AND IM SO SORRY ABOUT RED DEV!L

5 0
3 years ago
Are these numbers rational or irrational? √10 (square root of 10) √16 (square root of 16) 52% 1.235 1. Rational 2. Irrational pl
77julia77 [94]

Step-by-step explanation:

any rational number can be expressed as a/b, with a and b being integer numbers, and b different to 0.

-7 = -7/1 rational

sqrt(10) irrational (because there is no rational number multiplied by itself that results in 10)

sqrt(16) = sqrt(4×4) = 4 = 4/1 rational

52% = 52/100 rational

1.235 = 1235/1000 rational

5 0
3 years ago
Other questions:
  • Is 85/95 greater than 64/76
    15·1 answer
  • In parallelogram MNOP PK = 5x and KN = x2-14 what is PN?
    14·1 answer
  • A square pyramid with volume 92,100 m³ is dilated with a factor of 15 . What is the volume of the image? Express your answer to
    9·1 answer
  • What percent of your budget of $4,000 would your rent be if you pay $800 in rent?
    14·1 answer
  • 2+2 is 4, minus one is _
    7·2 answers
  • Hi :)
    12·1 answer
  • Use the graph f(x)=x^3 to graph h(x)=1/2(x-3)^2-2
    11·1 answer
  • Bo Karah can run a race in 4 hours 33 minutes if he runs at 7 m/s. How long will it take in hours and minutes if
    13·1 answer
  • HELP!!! ASAP
    14·1 answer
  • Write this down in standard form equation: slope = -1, (2, 5)
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!