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
Digiron [165]
3 years ago
12

Given the following method definitions: void mystery(double a) { System.out.print("double! "); } void mystery(int a) { System.ou

t.print("int! "); } What will be the output of the following code? mystery(1); mystery(1.0); Select one:
a. It is impossible to predict
b. int! double!
c. Duplicate function names results in a compiler error.
d. double! int!
Computers and Technology
1 answer:
kicyunya [14]3 years ago
6 0

Answer:

The correct answer to the following question is option "b".  

Explanation:

The method having the same name but the arguments have different so it is called method overloading. It is a part of the object-oriented programming language (oops).  

  • In the given code we define same method two times that is "mystery()". but in this method, we pass two different parameters. For the first time, we pass a double variable that is "a" as a parameter. In the second time, we pass an integer variable that is "a" as a parameter and in both functions, we write some codes.
  • In the calling time, we call function two times. In first time calling we pass an integer value that is "1" and second time calling we pass double value that is "1.0". So the output of this code is "int! double!".  

That's why the option "b" is correct.

You might be interested in
In a typical e-mail address, the "host" is user: which one of the following word processing features saves you the most time whe
gayaneshka [121]
Find-and-replace . hope this helps !
4 0
3 years ago
Sudden changes in _____ especially in high humidity conditions may cause condensation inside the camera and spoil it
Diano4ka-milaya [45]

Sudden changes in temperature especially in high humidity conditions may cause condensation inside the camera and spoil it.

<u>Explanation:</u>

When the temperature changes suddenly, it will affect the camera lens through condensation.  Condensation when it is caused only for few rounds, the camera will not be damages. But, when the process of condensation continues top exists it will definitely ruin and damage the camera.

Condensation affects the internal functionalities of a camera.  When a camera is brought from an environments where it is cold and dry, it will be affected by condensation during the period of summer. This is because it will be hot and this causes sudden change ion the temperature. Thus, it the changes in the environment temperature that causes damages to camera.

3 0
3 years ago
Which of the following are example of IT careers​
Iteru [2.4K]

Answer:

Where are the choices?

Explanation:

3 0
3 years ago
Many people describes computers as complex machine. what can this mean?
Airida [17]
They work in many different ways?
8 0
3 years ago
Which tool helps a project manager identify the task that have been completed and the ones that are still outstanding
vodka [1.7K]

Answer:

timeline please make me branliest

4 0
2 years ago
Other questions:
  • Discuss why mtv initially had a difficulty securing enough ads
    10·1 answer
  • Select the focus questions that emphasizes what is more important: (Select all that apply) a.What needs to be relegated to the b
    8·1 answer
  • Where can you find gradpoint answers
    13·2 answers
  • 1. Caches are important to providing a high-performance memory hierarchy to processors. Below is a list of 32-bit memory address
    7·1 answer
  • PLEASE PLEASE PLEASE PLEASE PLEASE HELP! I'M BEGGING Y'ALL! I NEED THIS FOR TODAY! CORRECT ANSWERS WILL BE AWARDED BRAINLIEST!
    6·1 answer
  • What does my name look like in binary code, btw my mane is Wendy Alexis Morales
    10·2 answers
  • Please code this in c++
    10·1 answer
  • Which of these statements about tags is false?
    12·1 answer
  • I don't know if this is supposed to go here or art but i need help with photoshop, basically you can create whatever you want bu
    7·1 answer
  • When can designers use rapid application development?
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!