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
olasank [31]
3 years ago
11

Consider the following class definitions. public class BClass { private int x; public void set(int a) { x = a; } public void pri

nt(){ } } public class DClass extends BClass { private int y; public void set(int a, int b) { //Postcondition: x = a; y = b; } public void print(){ } } Which of the following is the correct definition of the method set of the class DClass? (i) public void set(int a, int b) { super.set(a); y = b; } (ii) public void set(int a, int b) { x = a; y = b; }
Computers and Technology
1 answer:
Stella [2.4K]3 years ago
7 0

Answer:

The answer to the given question is the option "(i)".

Explanation:

In this question, the correct option is the "(i)" because In this method definition we use the super keyword. It refers to the parent's class. In this method, we use the superclass to call the above (parent) class method. and if we choose the option (ii), It will not call the parent class. That's why we use the option (i) which is correct.

You might be interested in
Taking multiple cells in a spreadsheet and combining them into one large cell is referred to as
lyudmila [28]
Cell merging or just merging
6 0
3 years ago
Read 2 more answers
What is co-operating process
Greeley [361]

Answer: A process is independent if it cannot affect other process or be affected by it

Explanation:

3 0
4 years ago
Can Anyone Send Me The Correct Code To This ?<br><br> ITS JAVA
scoundrel [369]

Answer:

whta u mean by code?

Explanation:

8 0
3 years ago
What is one disadvantage of transmitting personal data using digital signals?
a_sh-v [17]

Answer: The answer to your question is B i hope this helps

the reason for this is because useing digital signals can be hac,ked or accessed by another person so there for you maybe have to use another way.

Explanation:

i hope this helps if it does have a brilliant day and have a smile

6 0
3 years ago
Read 2 more answers
How are most gamepads installed on devices?
Doss [256]

Answer:

Plug and Play

Explanation:

most modern game pads are you just need to plug into a port and then you are free to use without any setting up.

3 0
3 years ago
Other questions:
  • Carl sent an e-mail to more than three thousand employees about a software update. The employees need to prepare for this update
    7·2 answers
  • the corrective actions you need to perform on a computer in case it functions in an unexpected manner is called what
    6·1 answer
  • Ruby is creating a presentation. She wants each slide displayed at intervals of five seconds. Which feature in the presentation
    6·2 answers
  • 20 PTS URGENT!!! Derek’s organization uses an emerging technology that uses specialized software to place an image on an object,
    6·2 answers
  • Computer security:
    15·1 answer
  • The _________ indicates the number of elements, or values, an array can hold
    14·1 answer
  • I cannot figure out how to cancel my Brainly subscription. I can’t click “account settings” and “cancel subscription” cuz when I
    5·2 answers
  • Roblox published a series of videos to help their audience use their creation engine, what are they called?
    7·2 answers
  • What two tools can be used to disable a service and to give a list of all currently running services, respectively?
    7·1 answer
  • PLEASE I NEED HELP PLEASE PLEASE<br> Which function prompts the user to enter information?
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!