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]
3 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]3 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
Questions Presscomion
Alex787 [66]

Answer:

i dont get what you are trying to ask

Explanation:

7 0
3 years ago
A hot spot is the __________. A. Point that collides with other objects B. Point an object spins around when it rotates C. First
Ber [7]
I would think it's A
5 0
3 years ago
A computer ________ is two or more computers connected using software and hardware so that they can communicate with each other.
kolbaska11 [484]
The answer would be a network

7 0
3 years ago
Those persons with little in the way of hacking skills that can access and use powerful hacking tools are called _______________
KIM [24]

Answer:

Script Kiddies or "Skiddies"

Explanation:

A script kiddie, or “Skiddie,” is someone who lacks programming knowledge and uses existing software to launch an attack. Often a script kiddie will use these programs without even knowing how they work or what they do. They begin playing with the various programs while searching for online tutorials. At first, they may be perceived as nothing more than an internet troll or noob, due to their lack of experience and quickness to brag and boast. Sometimes they will even resort to cyber stalking or bullying. However , this may simply be a cover for other more nefarious activity.

3 0
4 years ago
ANSWER QUICKLIY
lidiya [134]

Answer:

Explanation:

Allow you to view the document in different ways. Sorry if I am wrong. I am dumb

God bless, stay safe, and good luck! :)

4 0
3 years ago
Read 2 more answers
Other questions:
  • In what stage of writing does publishing occur
    14·1 answer
  • Question 3 / 5
    9·1 answer
  • Signs that a listener is paying attention include:
    10·2 answers
  • Which of the following statements opens the file info.txt for both input and output? a) dataFile.open("info.txt", ios::in &&
    11·2 answers
  • A technician is troubleshooting a Windows computer and needs to stop the explorer.exe process. Multiple attempts to open Task Ma
    5·1 answer
  • I want to solve this question
    5·1 answer
  • What do u think a creative app must have? <br><br> Please answer the question ASAP!!
    5·1 answer
  • Any action that causes harm to your computer is called a
    15·1 answer
  • Based on the information in the table, which of the following tasks is likely to take the longest amount of time when scaled up
    14·1 answer
  • Hahaahhaahahuahaahahhahqha
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!