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
Ms office suite comes with its own set of pictures in the​
goldfiish [28.3K]

Answer:

clipart ...........................

Explanation:

clipart is the correct answer for the above question.

6 0
2 years ago
460N of force is exerted on an object with a surface area of 2,5m.How much pressure is felt by the object?​
BartSMP [9]

Explanation:

p=F/A

p=460N/2m×5m

=46N/m2

7 0
2 years ago
Read 2 more answers
A file extension of. Xlsm indicates what type of workbook.
Vitek1552 [10]

We have that the .xlsm <em>Format </em>is used to save Excel Macro-Enabled Workbook file

<h3>Formats</h3>

Generally file are saved in different formats for easy sorting and application on the operating system.

For instance if a music file is renamed and stored in a different format say .exe the audio file wont be recognised as an audio file and hence refuse to play.

e.g

  • .exe for a windows appication
  • ,mp3 for an audio file
  • .xlsm here is used to save Excel Macro-Enabled Workbook file

For more information on Excel visit

brainly.com/question/19295387

8 0
2 years ago
A_________is an orderly collection of fact &amp; information.
sammy [17]

Answer:

C. Database

Explanation:

4 0
3 years ago
Which smb share option should you enable if you don't want users to see files they don't have at least read permission to?
BigorU [14]
Enable all of them. have a nice day


5 0
3 years ago
Other questions:
  • Select the correct statement(s) regarding digital baseband modulation.
    7·1 answer
  • What are multiple worksheets
    7·1 answer
  • Which tool could be used to display only rows containing presidents who served two terms?
    8·2 answers
  • How to get off of supervised user
    7·1 answer
  • PLEASE I NEED HELP FAST
    8·1 answer
  • PLEASE HELP!!! THIS IS DUE TODAY! WILL MARK BRAINLIEST!
    5·1 answer
  • What is the primary cause of the industrial revolution?
    12·1 answer
  • You have received an update package for a critical application you are running on a virtual machine. You have been told to insta
    8·1 answer
  • The second generation of computer languages is a higher-level language than
    14·1 answer
  • What is a good theme statement for the short Pixar film "bao"?
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!