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
xxTIMURxx [149]
3 years ago
14

If myClass has a constructor with a parameter of type String, select the other constructor that should be included.

Computers and Technology
1 answer:
JulijaS [17]3 years ago
7 0

Answer:

d. public myClass( ) {. . .}

Explanation:

A constructor is a special method that is called when an object of a class is created. It is also used to initialize the instance variables of the given class. A class may have one or more constructors provided that these constructors have different signatures. A class that does not have a constructor explicitly defined has a default parameterless constructor.

Having said these about a constructor, a few other things are worth to be noted by a constructor.

i. In Java, a constructor has the same name as the name of its class.

For example, in the given class <em>myClass</em>, the constructor(s) should also have the name <em>myClass</em>.

ii. A constructor does not have a return value. It is therefore wrong to write a constructor like this:

<em>public void myClass(){...}</em>

This makes option a incorrect.

iii. When a constructor with parameters is defined, the default parameterless constructor is overridden. This might break the code if some other parts  of the program depend on this constructor. So it is advisable to always explicitly write the default parameterless constructor.

This makes option d a correct option.

Other options b and c may also be correct but there is no additional information in the question to help establish or justify that.

You might be interested in
What are the types of action involving data base?
Alexeev081 [22]

Answer: The DBMS is a software system that explains the four types of actions, which are defining, constructing, manipulating, and sharing databases among various users and applications.

3 0
3 years ago
A company asked you help mitigate the brute force attacks carried out against its users' Windows account passwords. You successf
alexdok [17]

Answer:

a. Require user account passwords

e. Set failed logon restrictions

b. Require strong passwords

Explanation:

3 0
3 years ago
Which comparison operator is valid for greater than or equal to?<br><br> &gt;<br> &gt;=<br> =&gt;
lys-0071 [83]
The second one, it should be the one that is opening left with a line underneath, the images are unclear but that’s the most likely correct answer !
3 0
3 years ago
What field in a TCP segment is used to determine if an arriving data unit exactly matches the data unit sent by the source?
Rina8888 [55]

Answer:

a. Checksum

Explanation:

Based on the information provided within the question it can be said that the field that represents this information is called the Checksum. Like mentioned in the question this refers to a value that represents the amount of bits in a certain transmission message. This is done in order to make sure that the amount of bits that were sent match the amount that were received in order to make sure that no data was lost in transit that would cause high-level errors.

7 0
3 years ago
Can geico save me 15% or more on car insurance?
horsena [70]

Answer:

yes the ad says geico can save you 15% percent or more on car insurance

7 0
3 years ago
Read 2 more answers
Other questions:
  • How to reply to text from unknown number?
    11·1 answer
  • Which of the following statements about Linux is not​ true? A. Linux works on all the major hardware platforms. B. It plays a ma
    5·1 answer
  • My mac book airs touch pad stopped working and i can't click. what do i do?
    5·2 answers
  • What is the Documenter?
    10·1 answer
  • What is a third variable condition that could create the following correlation?
    10·2 answers
  • You want to copy data from one cell or range to an adjacent cell or range in your spreadsheet, without using a shortcut key. Whi
    10·1 answer
  • What is the code for this please?​
    13·1 answer
  • When you sign in to your Microsoft account with another Windows device, your settings will appear very differently than they do
    7·1 answer
  • Question #3
    15·2 answers
  • 8. Give regular expressions with alphabet {a, b} for
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!