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
Readme [11.4K]
4 years ago
8

Which of the following are incorrect? Group of answer choices An interface can contain constructors. You may declare a final abs

tract class. The constructors in an abstract class should be private. An abstract class can contain constructors.
Computers and Technology
2 answers:
spin [16.1K]4 years ago
6 0

Answer:

Explanation:

1. The answer is No, interface cannot have constructors. ... In order to call any method we need an object since there is no need to have object of interface, there is no need of having constructor in interface (Constructor is being called during creation of object).

2.A final class is considered complete and can not be subclassed (It's methods can not be overridden ). In case of abstract class, we have to proved implementation to abstract methods in subclasses. A final class can not have abstract methods and an abstract class can not be declared final.

3.private constructors are acceptable, however the class should be marked final instead, as doing so means the class is to be extended.

4.Yes! Abstract classes can have constructors! Yes, when we define a class to be an Abstract Class it cannot be instantiated(i.e an object cannot be created) but that does not mean an Abstract class cannot have a constructor. Each abstract class must have a concrete subclass which will implement the abstract methods of that abstract class.

SCORPION-xisa [38]4 years ago
4 0

<u>Answer:</u>

<u></u>

Incorrect options are;

i. An interface can contain constructors

iii. The constructors in an abstract class should be private.

<u>Explanation:</u>

<em>Option i is incorrect</em>. An interface cannot be instantiated (object cannot be created from it) or extended (classes cannot inherit from it) and as such no constructors are needed.

<em>Option ii is correct</em>. You may declare a final abstract class. This would just mean the class cannot be instantiated and neither can it be extended. That would also mean a redundant class.

<em>Option iii is incorrect</em><em>. </em>A constructor in an abstract class should not be made private (although possible). Otherwise, not only will it not be instantiable, it will also not be extensible.

<em>Option iv is correct</em>. An abstract class can contain constructors. Since abstract classes can be extended, having constructors in them will allow classes, that inherit from them, to be able to create objects from them.

You might be interested in
Stanovte intenzitu magnetického poľa v strede tenkej cievky s 20 závitmi. Prúd je 2A , stredný polomer cievky je 4cm.
ExtremeBDS [4]

Answer:

Determine the intensity of the magnetic field in the center of a thin coil with 20 turns. The current is 2A, the mean radius of the coil is 4cm.

Explanation:

to help english help you

4 0
3 years ago
What is the key function of a Scrum Master?
Reptile [31]

Answer:

The scrum master is the team role responsible for ensuring the team lives agile values and principles and follows the processes and practices that the team agreed they would use. The responsibilities of this role include: Clearing obstacles. Establishing an environment where the team can be effective.

Explanation:

8 0
4 years ago
7. When using find command in word we can search?
lesya [120]

Answer:

When using find command in word we can search all of the above

6 0
3 years ago
what is a conditional format that displays a horizontal gradient or solid fill indicating the cell's relitive value compared to
elena-14-01-66 [18.8K]

Answer:

Data bar

Explanation:

The answer to this question is data bar. Through the use of a day bar we are able to see trends in our data. They are very useful when it comes to visualization of values that are In a range of cells. Now if the bar is longer then the value we are visualizing is definitely higher. And if it is shorterr the value is lower. Several applications like excel has programmes that makes use of data bars especially for statistical purposes.

6 0
4 years ago
Which header will be the largest?<br><br> Hello<br><br> Hello<br><br> Hello<br><br> Hello
geniusboy [140]

Answer:  

Bye

bye

bye

bye

Explanation:

4 0
3 years ago
Read 2 more answers
Other questions:
  • What font is the declaration of independence?
    9·1 answer
  • When someone registers a domain name that is a company's trademark, hoping to resell it to the company at an exorbitant profit,
    14·2 answers
  • bro this scared me, i thought i just got hacked, could someone explain why when i went to ask a question, it kicked me out my ac
    9·2 answers
  • The register in the CPU is not the same as the RAM.
    13·1 answer
  • What is characteristic of the Computer?
    11·2 answers
  • PLEASE HELP I WILL GIVE BRAINLIEST!!
    8·1 answer
  • Cuantos puntos de habilidad se puede tener en clubes pro?
    9·1 answer
  • Write 2 paragraphs. 1 comparing Shrek the movie and Shrek the musical and another contrasting them.
    12·2 answers
  • which network component connects a device to transmission media and allows the device to send and receive messages?
    7·1 answer
  • How do I fix when it hits the second session it skips scanf..
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!