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
In what kind of attack can attackers make use of millions of computers under their control in an attack against a single server
rjkz [21]

Answer:

Distributed DOS attacks.

Explanation:

Computers in a network or the network itself is are prone to cyber attacks. A cyber attack is a concept of taking advantage of computer network vulnerabilities, to retrieve information from the target source. An example of these types of security attacks is the denial of service (or DOS) attacks.

The DOS  or the distributed DOS attack prevents users form accessing or requesting a service that they are legitimately allowed, by flooding the target system with superfluous resource request from millions of computers, controlled by the attacker.

8 0
3 years ago
Which three features can be configured in the BIOS settings to secure a computer?
Vladimir79 [104]
Passwords, TPM, and Drive Encryption.

Hope this helps. :)
8 0
2 years ago
Linda is training to become a certified network design expert and consultant. While researching about the process of cellular ra
mel-nik [20]

Answer:

a. The cell tower forwards the call to the wireless provider's Mobile Telephone Switching Office

Explanation:

When a cell phone user begins to make a call, it is picked up by the cell tower located in the cell in which the cell phone is located and that belongs to the user's wireless provider. The next step in this process is that the cell tower forwards the call to the wireless provider's Mobile Telephone Switching Office.

8 0
3 years ago
A runner has a speed of 5m/ s and a mass of 130 kg. what is his kinetic energy?
kondaur [170]

Answer:

0.001625

Explanation:

if the velocity of an object is lower than 1% of light speed

8 0
2 years ago
Hat is the limit of virtual machines that can be connected to a virtual network?
skad [1K]

<u>Unlimited </u> of virtual machines that can be connected to a virtual network.

<h3>What is a virtual machine employed for?</h3>

Virtual machines (VMs) allow a business to run an operating system that conducts like a thoroughly separate computer in an app window on a desktop.

<h3>What is a virtual machine in simple words?</h3>

A virtual machine (VM) is a virtual domain that functions as a virtual computer system with its CPU, memory, network interface, and storage, constructed on a physical hardware system (located off- or on-premises)

To learn more about Virtual machines , refer

brainly.com/question/26771683

#SPJ4

4 0
11 months ago
Other questions:
  • Jill needs to create a chart for technology club that shows what percentage of total students in the school play video games. Wh
    11·2 answers
  • How can earn more answer from brainly less than two minutes, please
    9·1 answer
  • When would a one way flag variable be used
    10·1 answer
  • Derek needs to shift from his desk to a new work area in his office. Which ergonomic principle should he follow while moving his
    14·1 answer
  • How can i turn on my prinfer without getting up
    12·2 answers
  • If I had to choose the class I prefer it would be a
    10·1 answer
  • Previous
    11·1 answer
  • Write a Python program segment, using a loop, to calculate and print the sum of the odd integers from 20 to 120. (Hint: 21 23 25
    13·1 answer
  • . A store offers a deposit of 6% on the cash price of $462. The deposit amount is?​
    6·1 answer
  • WHAT ARE SOME PROS AND CONS OF HYDROGEN FUELL CELLS
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!