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
zhuklara [117]
3 years ago
5

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

nt() { System.out.print(x); } } 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 correctly redefines the method print of DClass?
(i) public void print() { System.out.print(x + " " + y); }
(ii) public void print() { super.print(); System.out.print(" " + y); }
Computers and Technology
1 answer:
Feliz [49]3 years ago
4 0

Answer:

Option (ii) is the correct option to the following code.

Explanation:

In the following code of the Java Programming Language, there is two print function after the set function then, we firstly set the value of x and print it through print function which is already declared then, we set the value of y through set function then, print the value of y through print function. So, that's why the following option is correct.

You might be interested in
What kind of energy transformation occurs when you call someone on a cell phone?
andrew11 [14]

The <em><u>sound energy into electric energy and then into radiant energy.</u></em>

<em>[That's it]:)</em>

5 0
2 years ago
Misspelet errors are displays with a ...<br>.. below them<br>​
kkurt [141]

Answer:

The are displayed with red lines below them

3 0
3 years ago
Which is worse: Fast charging (Due to heat) or unplugging before reaching full capacity (On a normal charge)?
Ray Of Light [21]
Unplugging before reaching Capacity
4 0
4 years ago
There is overlap in the subjects of study in the different information technology disciplines.
Korolek [52]

There is overlap in the subjects of study in the different information technology disciplines is a True statement.​

<h3>What is computer Science about?</h3>

There is found to be a lot of confusion about computer science and why it is said to be also called “computing”.

There is seen to be a lot of  allied computing-related fields, such as information systems and that of computer engineering.

Hence, There is overlap in the subjects of study in the different information technology disciplines is a True statement. because those subject have different topics.

Learn more about information technology from

brainly.com/question/25110079

#SPJ1

6 0
1 year ago
Read 2 more answers
The CPU converts into information. The CPU is the mastermind of the computer, controlling everything that goes on through a seri
Harman [31]

Answer:

Mathematical sequences

Explanation:

Just did it

5 0
3 years ago
Read 2 more answers
Other questions:
  • You are reluctant to write an extra credit book report because you are afraid that your language and punctuation skills are not
    11·1 answer
  • How has technology affected the way that you produce art like photographs?
    8·1 answer
  • Using the Invert Selection tool while something is selected in Paint will __________.
    14·1 answer
  • What is output by the following program? int i = 7; while (i&gt;=2){System.out.print (i +""); if ((i%3) == 0){ i +2; } else { i/
    6·1 answer
  • Given numRows and numColumns, print a list of all seats in a theater. Rows are numbered, columns lettered, as in 1A or 3E. Print
    14·1 answer
  • Which type of computer graphic can be blown up to a much larger size without getting distorted or losing quality?
    5·1 answer
  • If all the data in a database is not physically located in one place, it would be a(n _______ database.
    5·1 answer
  • What type of version of visual studio is the visual studio express
    8·1 answer
  • Video is a medium that's looks real anyways, but is real________________.
    10·1 answer
  • Why is it so important to adhere to principles that have been put forth by reputable organizations to ensure that you are mainta
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!