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
The Recycle Bin exists as a metaphor for throwing files away, but it also allows a user to retrieve and restore files. Once the
Karolina [17]

Answer:

a) INFO2 file

Explanation:

When a file is deleted and moved to the Recycle Bin generates its own records inside a INFO2 file. These files save data from the deleted file, so it can be analyzed later. The size of a INFO2 file is 800 bytes usually.

The data saved into this files is:

  • Original location of the removed file
  • Date and time when deleted
  • Physical size of the deleted file
6 0
3 years ago
A(n) ____________ is a group of similar or identical computers, connected by a high-speed network, that cooperate to provide ser
scoundrel [369]

Answer:

cluster

Explanation:

A cluster in a computer system is a collection of servers and other resources that work together to provide high reliability and, in certain situations, load balancing and parallel processing.

6 0
2 years ago
How do you turn on the Track Changes feature in a word-processing document?
aniked [119]
Click options in the tools menu and select track changers
5 0
3 years ago
What is phishing?
alexira [117]

Answer:

Phishing is the malicious act of keeping a false website or sending a false e-mail with the intent of masquerading as a trustworthy entity in order to acquire sensitive information such as usernames, passwords, and credit card details.

Therefore, the answer to the question is option C.

7 0
3 years ago
Differentiate between computer organization and computer architecture with example
vazorg [7]
<span><span>Computer architecture was essentially a contract with software stating unambiguously what the hardware does. The architecture was essentially a set of statements of the form "If you execute <span>this </span>instruction (or get an interrupt, etc.), then that is what happens." <More sophisticated readers: I get to the term "ISA" later.>
</span><span>Computer organization, then, was a usually high-level description of the logic, memory, etc., used to implement that contract: These registers, those data paths, this connection to memory, etc.

</span></span>Computer Architecture and Computer Organization Examples

<span>Intel and AMD make X86 CPUs where X86 refers to the computer architecture used. X86 is an example on a CISC architecture (CISC stands for Complex Instruction Set Computer). CISC instructions are complex and may take multiple CPU cycles to execute. As you can see, one architecture (X86) but two different computer organizations (Intel and AMD flavors).
<span>
nVidia and Qualcomm on the other hand make GPUs (graphics processing unit as opposed to a CPU central processing unit). These GPUs are based on the ARM (Advanced RISC Machines) architecture. ARM is an example on a RISC architecture (RISC stands for Reduced Instruction Set Computer). Instructions in an ARM architecture are relatively simple and typically execute in one clock cycle. Similarly, ARM here is the computer architecture while both nVidia and Qualcomm develop their own flavor of computer organization (i.e architecture implementation)</span></span>
8 0
4 years ago
Other questions:
  • What is also known as a visual aid in a presentation
    8·2 answers
  • What kinds of online behaviors could be considered cyberbullying?
    7·2 answers
  • ) write a program that creates a vector of string called "vec". vector "vec" grows and shrinks as the user processes the transac
    6·1 answer
  • How can a signature be added to an email message? Check all that apply.
    10·2 answers
  • Out of a list of the values 8, 3, 30, 5, 15, and 6, what result would the MIN function return?
    9·2 answers
  • Need help ASAP??? Pick the best answers
    10·1 answer
  • Write an expression whose value is the concatenation of the three strigs name1, name2, and name3, separated by commas
    9·1 answer
  • 30 pts!<br> Explain how Moore's law presumes everyone will have access to the Internet.
    14·1 answer
  • What software can be used for remote operation of a sunsdr2 dx?.
    13·1 answer
  • Calvin is creating a 3D shell of a turtle. He is creating a sculpted, intricate design for the pattern he wants on the shell, bu
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!