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
Mashcka [7]
3 years ago
7

A constructor can be overloaded with more than one function which has the same name but with what two different things

Computers and Technology
1 answer:
andreyandreev [35.5K]3 years ago
5 0
<h2>Answer:</h2>

i. Number of parameters

ii. Type of parameters

<h2>Explanation:</h2>

When there are two or more constructors, definitely with the same name, in a given class, then the constructors are said to be overloaded. An overloaded constructor appears declared many times in a class but each time with different number of parameters and/or type of parameters.

For example, given a class Test, the following combination of constructors can exist;

i. public Test(int x){

   

 }

ii. public Test(String m){

     

  }

iii. public Test(int a, String b){

 

}

<em>The following should be noted;</em>

In the case of combination (i) and (ii), the constructors have the same number of parameters but different type of parameter. In other words, they both have 1 parameter but while the first one has a parameter type of <em>int</em>, the second has a parameter type of <em>String</em>.

In the case of combination (ii) and (iii), the constructors have different number of parameters and of course different type of parameters. In other words, the second constructor has 1 parameter of type <em>String</em> while the third constructor has 2 parameters of types <em>int</em> and <em>String</em>.

You might be interested in
What is the output of the following program?
Alex787 [66]

Answer:

B:2 should be the first answer

C: 14 the second

7 0
3 years ago
Why do mosquitoes lay eggs in water​
d1i1m1o1n [39]

Answer: Some species of mosquitoes lay their eggs on water or on vegetation very near to water because their larval instars are aquatic. Thus, when the eggs hatch the first instar larvae will already be in the larval media. Some species of Aedes mosquitoes lay their drought resistant eggs on the soil of dried up playa lake beds. When it rains, the moisture will serve as a hatching stimulus and the eggs will hatch and spend their larval instars in the pools of rainfall. Other mosquito female will lay their eggs in the water of plant axils, tree holes and related plant habitats. In each of these instances, the immature mosquito instars require water in larval development and molt into adult insects.

hope it helps you

3 0
3 years ago
Read 2 more answers
PYTHON ERROR, PLEASE HELP I'LL GIVE BRAINLIEST TO WHOEVER HELPSSSS
cricket20 [7]
U put too many brackets on the second to last line at the end
6 0
3 years ago
Which is the best description of a computer virus?
MatroZZZ [7]
The best description of a computer virus is. Someone first starts out making a malicious program, then can send it to a unexpected user. After that, when the user opens the malicious program, it can do negative things on the target. The virus first starts out in the system32, then infects a random file type for example, exe files, or dlls etc. Then random errors can pop up on the computer saying "YOUR COMPUTER IS UNDER RISK! CALL THIS NUMBER NOW! 555-555-5555" and the options of the error, can direct you to a website, that can give you another virus. To get rid of a virus, you have to ignore the popups that comes onto your computer, and get a strong antivirus like avast, or avg. Then let it scan the system. After when the scan is done, it will show up the virus, and it will give you options "to delete virus or ignore it" you would hit delete. I hope this answer helped you. Let me know if you have any more questions! Thanks!
6 0
3 years ago
Read 2 more answers
Point out the correct statement.
NeTakaya

Answer:

Option D is correct.

Explanation:

Cassandra labeling information with such a gravestone indicates should restart transmitting an erase request to such a duplicate that had been down earlier of deletion.

Cassandra may not instantly delete information labeled for removal from disc the removal of identified information takes place throughout compaction a deleted section may reappear when a maintenance is never regularly carried out.

4 0
3 years ago
Other questions:
  • What should you do when an error message pops up on the screen?
    7·2 answers
  • Assignment 3: Chatbot
    11·2 answers
  • When and how should internet service providers be allowed to treat some kinds of internet traffic different from others?
    7·1 answer
  • How is cropping different from scaling?​
    11·1 answer
  • The Python print function
    9·1 answer
  • Select the correct answer.
    9·2 answers
  • One disadvantage of online information sharing is that:
    14·2 answers
  • PLEASE WRITE A ONE SENTANCE SUMMARY, WILL GIVE BRAINLIEST!! (history of computers) You have completed an extensive investigation
    10·1 answer
  • ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
    14·1 answer
  • Hi I'm new to Brainly anyone wanna be my frnd​
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!