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]
3 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]3 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]3 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
The flagging of an uncommon last name as a spelling error can be stopped by opening the shortcut menu on the first occurrence of
Mice21 [21]

Solution:

The flagging of an uncommon last name as a spelling error can be stopped by opening the shortcut menu on the first occurrence of the name and selecting of ignoring all.

Thus the required right answer is B.

8 0
3 years ago
Which does a traditional camera need in order to capture images?
pashok25 [27]

Answer:

I think secure digital is needed

3 0
3 years ago
write HTML code to create a web page which will contain a title my favourite book as a centralised heading feluda somogro and bo
Trava [24]

Answer:

Satyajit Ray (1921–1992), a Bengali film director from India, is well known for his contributions to Bengali literature. He created two of the most famous characters in Feluda the sleuth, and Professor Shonku the scientist. He wrote several short novels and stories in addition to those based on these two characters. His fiction was targeted mainly at younger readers (mostly teenagers) , though it became popular among children and adults alike.



Ray during recording of his film Pather Panchali

Most of his novels and stories in Bengali have been published by Ananda Publishers, Kolkata; and most of his screenplays have been published in Bengali in the literary journal Ekshan, edited by his close friend Nirmalya Acharya. During the mid-1990s, Ray's film essays and an anthology of short stories were also published in the West. Many of the stories have been translated into English and published.

3 0
2 years ago
Which of the following CANNOT incorporate animation
Anarel [89]
Lost the following …
8 0
2 years ago
What is one way polymorphism is implemented?
podryga [215]

Answer:

repurposing an operation

Explanation:

Got it right

8 0
3 years ago
Other questions:
  • When issued a GFE device, you are required to sign an AUP
    12·2 answers
  • You have received several trouble tickets from the employees in the warehouse for the stand-alone computers used to control vari
    14·1 answer
  • Which of these automotive repair areas helps the vehicle change speeds to operate efficiently under all conditions?
    5·1 answer
  • What are issues to consider when deciding to build software in-house or purchase commercial off-the-shelf software (cots)?
    14·1 answer
  • ListenListen with ReadSpeakerAn administrator working on a Windows Server 2016 Server Core installation needs to disable DHCP on
    9·1 answer
  • Your wireless network has been breached and it seems as though the attacker has modified a portion of your data that is used wit
    12·1 answer
  • Explain the difference between true north and magnetic north.
    9·1 answer
  • Create a TicTacToe class that initializes a 3x3 board of "-" values. We will use this class in future exercises to fully build o
    9·1 answer
  • Consider the following method, which is intended to return the index of the first negative integer in a given array of integers.
    14·1 answer
  • Taylor and Rory are hosting a party. They sent out invitations, and each one collected responses into dictionaries, with names o
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!