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
Leya [2.2K]
2 years ago
14

Would this program compile run? If not, why; if yes: what would be the output? public class ConstChaini { public static void mai

n(String [] args){ new SubClass(); System.out.println(); new SubClass(1); } class SuperClass{ public SuperClass(){ System.out.print(-4-); } public SuperClass(int i){ System.out.print("8"); } } class SubClass extends SuperClass( public SubClass()( this(1e); System.out.print(C"); } public SubClass(int i){ super(i); System.out.print("D"); }
Computers and Technology
1 answer:
nikdorinn [45]2 years ago
8 0

Answer:

Check the explanation

Explanation:

// Code to copy

public class ConstChain1 {

public static void main(String[] args)

{

new SubClass();

System.out.println();

new SubClass(1);

}

}

class SuperClass{

public SuperClass() {

System.out.println("D");

}

public SuperClass(int i) {

System.out.println("C");

}

}

class SubClass extends SuperClass{

public SubClass() {

this(10);

System.out.println("B");

}

public SubClass(int i) {

super(i);

System.out.println("A");

}

}

Explanation:

Now each time when a object of a subclass is been created it's super class constructor will be executed first then only subclass object is created by executing it's constructor.

You might be interested in
Blending two or more colours is called​
krek1111 [17]

Answer:

shading?

Explanation:

Ombré /ˈɒmbreɪ/ (literally "shaded" in French) is the blending of one color hue to another, usually moving tints and shades from light to dark. It has become a popular feature for hair coloring, nail art, and even baking, in addition to its uses in home decorating and graphic design.

3 0
3 years ago
As a prospective student, what is the best reason to request an interview with your college application?
weqwewe [10]

Answer: The correct answer is A. I just answered this question myself!

6 0
2 years ago
What is a focus of Accenture's point of view on blockchain in the marketplace?
Ipatiy [6.2K]

Answer:

enabling clients to store all their data, documents, and employee information on blockchain. accumulating the most data from wherever possible and building a comprehensive data lake.

Explanation:

4 0
2 years ago
First calculating device​
AnnyKZ [126]

Answer:

abacus is first calculating device

7 0
3 years ago
Read 2 more answers
Forgot this website exsited wsp
Mariulka [41]

Answer:

no

Explanation:

5 0
2 years ago
Read 2 more answers
Other questions:
  • what is the restaurant with the black pom tree and yellow backround three letter name from hi guess the restaurant
    14·2 answers
  • What steps should Jeremy take to get himself motivated to study for the test?
    12·2 answers
  • After trying multiple times, a coworker is not able to fit a motherboard in a computer case, and is having difficulty aligning s
    11·1 answer
  • Kevin gets a call from a user who is trying to install a new piece of software. The user doesn’t have administrative rights, so
    10·1 answer
  • A photographer uses which of these tools to form an argument?
    14·2 answers
  • Generally speaking, problems are rarely caused by motherboards. However, there are some instances in which a motherboard can fai
    12·1 answer
  • Explain what a datalist element does and is used for.
    12·1 answer
  • Use the drop-down menus to explain what happens when a manager assigns a task in Outlook.
    6·2 answers
  • Summary on how drones can help manage the environment
    13·1 answer
  • HELP ME PLEASE 41 PTS
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!