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
True or false: Concurrent validation is more time consuming to measure than predictive validation because it involves a wait per
nikdorinn [45]

This is false, I hope this helps you with your task

4 0
2 years ago
Writing down your main ideas, subpoints, and supporting material, then using geometric shapes and arrows to indicate logical rel
horsena [70]

The process that involves writing down your main ideas, subpoints, and supporting material, then using geometric shapes is mapping.

This includes uses of  arrows to indicate logical relationships.

<h3>What is mapping?</h3>

mapping can be regarded as the prescribed way of assigning an object to each object in one set a particular object.

Learn more about mapping at:

brainly.com/question/25168859

7 0
2 years ago
I used a walmart MoneyCard and now it says its prepaid. Its my dad's card.
Scorpion4ik [409]

Answer:

oh- Did he find out-

Explanation:

8 0
3 years ago
Complete the function to return the result of the conversiondef convert_distance(miles):km = miles * 1.6 # approximately 1.6 km
AnnZ [28]

Answer:

The complete program is as follows:

def convert_distance(miles):

   km = miles * 1.6 # approximately 1.6 km in 1 mile

   return km

my_trip_miles = 55

# 2) Convert my_trip_miles to kilometers by calling the function above

my_trip_km =convert_distance(my_trip_miles) #3) Fill in the blank to print the result of the conversion

# 4) Calculate the round-trip in kilometers by doubling the result,

print("The distance in kilometers is " +str(my_trip_km))

# and fill in the blank to print the result

print("The round-trip in kilometers is " + str(my_trip_km * 2))

Explanation:

<em>The program is self-explanatory because I used the same comments in the original question.</em>

5 0
2 years ago
[5]Suppose a 1,600 kg car is traveling at 20.0 m/s. What average force is needed to stop the car in 4.0 s?
SVEN [57.7K]
This is in the wrong caterigore and yes the answer is 8.0 × 103 N 
5 0
3 years ago
Read 2 more answers
Other questions:
  • Type the correct answer in the box. Spell all words correctly.
    9·1 answer
  • IBF Consultants, LLC provides consulting services in privacy and theft deterrence solutions. Another client has very sensitive d
    7·1 answer
  • The ________ Web, originally envisioned by Tim Berners-Lee, one of the founders of the Internet, is a set of design principles t
    15·1 answer
  • To exit Access, click the ____ button on the right side of the Access title bar.
    9·1 answer
  • Help me I'm so confused by this question
    7·1 answer
  • I prefer a job where I am praise for good performance or I am accountable for results
    13·1 answer
  • 2.
    8·1 answer
  • What is Automation ? Please give an example ?
    14·1 answer
  • Sean works for a company that ships hospital equipment. He needs to calculate the weight of the items being shipped. He enters t
    12·1 answer
  • Binary search takes a list of information and divides the list into two parts, one is divided and one is kept.
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!