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
Setler79 [48]
3 years ago
15

Meg[] elements = {new Lois(), new Stewie(), new Meg(), new Brian()}; for (int i =0; i

Computers and Technology
1 answer:
Stells [14]3 years ago
7 0

Complete question is attached as snapshot.

Answer:

This will result in a compilation error.

Here's the inheritance hierarchy:

Meg -> Lois -> Brian -> Stewie

Now Meg has 2 public Fxns, a() and toString().

Lois inherits from Meg and all its public functions as well but, overrides the a() fxn of its super class.

So finally Lois has fxns a(), b() and toString().

Brian extends Lois and inherits all the above listed fxns of Lois, but overrides the b() and toString() fxns.

Stewie extends Brian and inherits all the fxns of Brian, but overrides the a() and toString() fxns.

In the Main driver fxn, we call a() and b() methods of all these classes but, the base class Meg has no b() and it is not extending any class so its not available in its scope.

This results in a compilation error.

Explanation:

You might be interested in
Why can videos be streamed from the cloud to a computer with no loss in
mezya [45]
I think the answer is B
3 0
2 years ago
Read 2 more answers
Macro photographs are what type of photographs? A. Close-up B. Telephoto C. Abstract D. All of the above
scZoUnD [109]

Answer:

A

Explanation:

they are close up. they are not telephoto or abstract

marco can be telephoto, but it is not nessacarily always telephoto. marco is by definition a close up photo

5 0
3 years ago
A ______ statement selects for execution a statement list having an associated label that corresponds to the value of an express
bogdanovich [222]

Answer:

A) Switch

Explanation:

In Java and most programming Languages, A Switch Statement provides a multi branch statements which provides a more flexible way for transfer of execution to the branch that fulfills the condition of the expressed value. This is a better way of handling if...elseif....else statements. In this way, a variable is tested for equality against some values. Variables used in switch expressions can only be primitives (int, byte, char), enums and strings.  A switch statement has

1. A default statement (optional), appears at the end of the switch and acts as the else condition.

2. A break statement which terminates the switch when reached.

The syntax of a switch statement is given below:

switch(expression) {

 case x:

   // code block

   break;

 case y:

   // code block

   break;

 default:

   // code block

}

6 0
3 years ago
Which of the following statements holds true for the term "html"? It refers to a system that connects end users to the Internet.
Oksana_A [137]

Answer:

Your answer is B. It refers to the language used to create and format Web pages.

Explanation:

HTML stands for "Hyper Text Markup Language", which is a specification used on any webpage, ever. It was created by Sir Tim Berners-Lee in late 1991 and was officially released in 1995. This language is actually what is sent to your browser, which then interprets it and allows you to see the pretty pictures of Brainly.com! As of right now, HTML is at it's 5th revision, also known as HTML5, which is another term you'll see around.

Thanks, let me know if this helped!

3 0
3 years ago
Read 2 more answers
A .jpg file is an example of which of the following file types
egoroff_w [7]
A .jpg file is going to be a picture. =)
5 0
3 years ago
Read 2 more answers
Other questions:
  • Given the following business scenario, create a Crow's Foot ERD using a specialization hierarchy if appropriate. Granite Sales C
    12·1 answer
  • Traffic that is encrypted will typically pass by an intrusion prevention system untouched.a. Trueb. False
    10·1 answer
  • Fourlotts Corp. provide integrated services that include storing manufactured goods, packaging, and delivering it to the dealers
    13·1 answer
  • If you define a destructor, are you required to define an operator '=' and a copy constructor?
    9·1 answer
  • In addition to the decimal number system, the number systems used most often in PLC operationand programming are ________.
    9·1 answer
  • What is a function of Agile software development?<br>​
    7·1 answer
  • Write the difference between left-sentential form and <br> right-sentential form
    13·1 answer
  • FREEE POINTS
    8·2 answers
  • A(n) _____ is a local connection point-of-presence that connects a variety of high-performance networks, and its main function i
    5·1 answer
  • Why is quantum computing potentially a better fit for weather forecasting than classical computers?.
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!