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
In Microsoft Word you can access the _______ command from the "Mini toolbar". A. insert citation B. save as C. underline D. word
tresset_1 [31]
Save as is the command that you would use to save anything when using microsoft
4 0
3 years ago
Read 2 more answers
Mad Libs are activities that have a person provide various words, which are then used to complete a short story in unexpected (a
allsm [11]

Answer:

The code is below. The output is "Eric went to Chipotle to buy 12 different types of Cars"

Explanation:

import java.util.scanner;

public class labprogram {

    public static void main (string [ ] args) {

    scanner scnr = new scanner (system.in) ;

    string firstname;

    string genericlocation;

    int wholenumber;

    string pluralNoun;

   firstName = scnr.next();

   genericLocation = scnr.next();

   wholeNumner = scnr.nextInt();

   pluralNoun = scnr.nextLine();

   system.output.println(firstname + " went to " + genericlocation + " to buy " + wholenumber + " different types of " + pluralnoun + " . ");

}

 }

6 0
3 years ago
You can use predesigned, formatted files called _____ to create new worksheets quickly.
Leokris [45]
You can use predesigned, formatted files called -templates- to create new worksheets quickly.
8 0
3 years ago
Allison is preparing to modify a network access control list and add three firewall rules to her private cloud HR systems. She i
Yakvenalex [24]

C. Change management

Allison is preparing to modify a network access control list and add three firewall rules to her private cloud HR systems by following the Change management process.

What exactly is change management?

Change management is the process of developing and implementing effective change strategies in businesses and organizations.

Examining the reasons for change, implementing changes, and assisting people in adapting to these changes are all part of it. This could include reorganizing the workforce, implementing new technology, lowering costs, increasing profits, or a combination of these to achieve a specific goal.

To know more about Change management, visit: brainly.com/question/28096717

#SPJ4

4 0
1 year ago
Please write down your student id. take the last digit of your student id as m.
solmaris [256]
Now why in the world anyone would want to do that....



Really!!!!
7 0
3 years ago
Other questions:
  • What are factors that limit a technological design
    13·1 answer
  • A _____ is a device that not only provides surge protection, but also furnishes desktop computers and network devices with batte
    7·1 answer
  • Which of the following is an example of a direct payment subsidy?
    12·1 answer
  • Technical term of stealing personal information in social media.​
    5·1 answer
  • What do you suggest for Father's Day?​
    7·1 answer
  • Examples of pop in computer​
    14·1 answer
  • Gaining information by tricking an individual into releasing information is often referred to as.
    15·1 answer
  • Web résumés allow you to include extra graphics and images that you would not include in a traditional résumé. please select the
    9·1 answer
  • What should a pie chart represent?
    6·1 answer
  • assuming the default gateway is connected to the internet, what type of internet access would this server have?
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!