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
Which of the following are the functions of an os?
cricket20 [7]
Manage the computer's resources, such as the central processing unit, memory, disk drives, and printers, (2) establish a user interface, and (3) execute and provide services for applications software.
6 0
3 years ago
Keeping in mind the role the order of precedence plays in equations, what would Excel display as the result of the following equ
Arlecino [84]
Keeping in mind the role the order of precedence plays in equations, what would Excel display as the result of the following equation?

=(24+75)/(6*3)
=99/18
= 5.5
18)99.0.
90.0
9.0

D. 5.5



6 0
3 years ago
Which THREE of the following actions can you perform with most webmail services?
laila [671]

Answer:

C.find the email address of someone you know

D.maintain an address book of your contacts

E.organize your emails In folders

8 0
2 years ago
the manager of a xyz organisation is preparing the organizational chart which feature of MS Excel /he will use to do so? also wr
chubhunter [2.5K]

Answer:

Smart Art

Explanation:

The smart art feature in Microsoft excel allows for the creation of organizational chart on Microsoft excel. It readily allows for an hierarchical arrangement of an organization's personnel including the various departments on the system. The smartart allows the implementation of a graphical output which allows the display of an organization's personnel in order of hierarchy. To get started with smart art on excel, Clicking on the insert tab, the same are appears under illustrations. For an organizational chart, the Hierarchy smart art graphic type is selected and filled accordingly.

3 0
2 years ago
3. What is a web directory? What are the key differences between web directories
MrMuchimi

Answer:

web directories are much smaller and more specific than search engines

3 0
2 years ago
Other questions:
  • What kind of device is a printer? output or input
    13·1 answer
  • Project using simple formulas
    15·1 answer
  • What can be designed to create annoying glitches or destroy data
    11·1 answer
  • What is a slide master ?
    8·2 answers
  • 4.17 LAB: Varied amount of input data ( C++)
    5·1 answer
  • Write a Java program that generates GUI (Graphical User Interface). Your program should provide labels and textfields to a user
    9·1 answer
  • Compare and contrast CD and DVD?
    10·2 answers
  • what are the benefits of VolP? select all that apply. A:cheaper printings B:clearer calls C: faster download D: increased effici
    11·2 answers
  • Vannevar Bush imagined a desktop computing machine that would allow people to access data stored in various information centers
    13·1 answer
  • What is one way object-oriented programming differs from procedural programming?
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!