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
If Nancy receives an encrypted message from Matthew, which key does she use to read it? Nancy’s private key Nancy’s public key M
Juliette [100K]

Answer:

Nancy's private key

Explanation:

She's receiving it.  That means Matthew used her public key to encrypt it.  She should decrypt it using her private key.  Watch this video for clarification :)

Watch The Internet: Encryption & Public Keys on the big video site which cannot be named on brainly :p

7 0
3 years ago
What was the worlds first coding language
svetoff [14.1K]

Answer:

lol baby

Explanation:

becuase it goated

8 0
2 years ago
Read 2 more answers
What is the name of the interface that uses graphics as compared to a command-driven interface?
bonufazy [111]
Answer = GUI (Graphical User Interface)
4 0
3 years ago
Help? brainliest and point
stiks02 [169]

Answer: second one

Explanation:

sorry lol

7 0
3 years ago
Im timed!!!!!!!!!!!!!!!!!!<br><br> I NEED HELP ASAP<br> THANK YOU SO MUCH
Troyanec [42]

Answer:

card sorting

Explanation:

tell me if im wrong...

6 0
3 years ago
Read 2 more answers
Other questions:
  • What is the cell reference for the cell located in the second column and fifth row of a worksheet?
    9·1 answer
  • Select the correct answer.
    15·1 answer
  • which of the following is a component of a rope-rewind starter system? a. a recoil spring c. an air vane governor b. a wrist pin
    5·1 answer
  • Which of the following is NOT an argument used to determine how a shot is fired from an A. object the shot itself being instanti
    12·1 answer
  • If you could make another device "smart" and have
    12·1 answer
  • What is an antispamming approach where the receiving computer launches a return attack against the spammer, sending email messag
    9·2 answers
  • What are 3 important reasons to reconcile bank and credit card accounts at set dates?
    15·1 answer
  • Role of memory in a computer system
    10·1 answer
  • Most portable devices, and some computer monitors have a special steel bracket security slot built into the case, which can be u
    13·1 answer
  • Please list 15 safety rules that you think should be practiced in the Computer Technology classroom/lab.
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!