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
These things are commonly found on the front of desktop computer cases:
jok3333 [9.3K]

USB ports, headphone jack/microphone port, and of course, a power button.

3 0
3 years ago
Cloud architects have been largely replaced by ScrumMasters.<br><br> True<br><br> False
Kitty [74]
True much larger than scrum masters
6 0
3 years ago
Read 2 more answers
Which employees work directly with customers, helping them make deposits and withdrawals?
d1i1m1o1n [39]
I believe the answer is customer service
5 0
3 years ago
Read 2 more answers
Injection attacks variants can occur whenever one program invokes the services of another program, service, or function and pass
velikii [3]

Answer:

True

Explanation:

In Computer science, It's true that injection attacks variants can occur whenever one program invokes the services of another program, service, or function and passes to it externally sourced, potentially untrusted information without sufficient inspection and validation of it.

5 0
3 years ago
True / False
artcher [175]

Answer: True

Explanation:

Embedded system processor are more powerful than general purpose processor because the embedded  processors are designed to work in a particular machine for which they get the right amount of RAM and hardware however general purpose processors are to work in every machine which makes them little slow in some machine as they do not get the proper hardware and RAM and have to cope with much more demanding situations.

7 0
4 years ago
Other questions:
  • Which step of the machine cycle examines the op-code of the next instruction to be executed?
    12·2 answers
  • Which punctuation mark appears on a number key?
    8·1 answer
  • "______" is a wireless local network that uses high frequency radio signals to transmit an Internet signal from a wireless route
    9·1 answer
  • Design a program that will receive a valid time in the 24-hour format (e.g. 2305) and convert to its equivalent 12-hour format (
    14·1 answer
  • Question #2
    6·2 answers
  • How do computers use input and output to get and give the information that they need to solve problems?
    10·1 answer
  • Write a C class, Flower, that has three member variables of type string, int, and float, which respectively represent the name o
    12·1 answer
  • CC stand for.....in the email platform?
    12·2 answers
  • 1.               Which of the following is smallest?
    6·2 answers
  • Anybody know how to code?
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!