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 would you need to have on your foley stage
LUCKY_DIMON [66]
<span>You will need many props for your Specific tracks (whatever you see in the film!). It's impossible to say what you will need until you see the picture and as time goes by you will add to your collection (if you have space!) - garbage day in my neighborhood is 'golden day' as I collect some of best props from the stuff people throw out: old bicycles, doors, sinks, wood, metal, desks, etc.</span>
4 0
3 years ago
When installing a network cable with multiple strands, a network technician pulled the cable past a sharp edge and exposes the c
MariettaO [177]

Answer:

A short

Explanation:

A short in electrical terms is an abbreviation for a short circuit. This generally means that there is an unintended connection between two points allowing current to flow where it should not. In your particular case, it means that a cable is damaged and that two or more of the conductors are connected together causing the cable to fail.

8 0
4 years ago
Write code to complete print_factorial()'s recursive case. sample output if user_val is 5: 5! = 5 * 4 * 3 * 2 * 1 = 120
maxonik [38]
```
#!/usr/local/bin/python3


import sys

def print_factorial( user_val ):
    if( user_val < 1 ):
        return( 1 )
    else:
        return( print_factorial( user_val - 1 ) * user_val )


if( __name__ == "__main__" ):
    if( len( sys.argv ) == 2 ):
        print( print_factorial( int ( sys.argv[ 1 ] ) ) )
    else:
        sys.stderr.write( "usage: %s <integer>\n" % sys.argv[ 0 ] )

    exit( 0 )
```

5 0
3 years ago
Why might your coworker suggest encrypting an archive file before e-mailing it??
Genrish500 [490]
Because to prevent MITD (Man in the middle is a man that in the middle of the network. For example: You are sending a text, the man in the middle or in the modem will receive the text and can edit it and send it to the receiver, or the man will put the virus in...) and to prevent server snooping
8 0
3 years ago
The process of using or controlling two or more windows at a time is known as. a threading .b multitasking. c hyperthreading.d s
mixas84 [53]
<span>The process of using or controlling two or more windows at a time is known as multitasking.</span>
5 0
3 years ago
Other questions:
  • In which area of engineering does material selection play a vital role a design optimization b forensic engineering c mechanical
    6·1 answer
  • A(n) __________________ device is a breath analyzer on your vehicle that is electronically connected to the ignition.
    11·1 answer
  • Varied amount of input data Statistics are often calculated with varying amounts of input data. Write a program that takes any n
    8·1 answer
  • 9. DIMMs used in servers can provide additional reliability if they use what specific technology.
    8·1 answer
  • Examples of websites that use . com
    10·1 answer
  • Can you please help me?
    6·1 answer
  • Is a free verse a poetry that has no images
    5·2 answers
  • Which statement correctly differentiates how to use list and table styles?
    12·2 answers
  • What is the "thinking work" of the computer? How does it help the computer?
    5·1 answer
  • For which input values will the following loop not correctly compute the maximum of the values? 1. Scanner in = new Scanner (Sys
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!