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
is defined as the condition in which all of the data in the database are consistent with the real-world events and conditions
-BARSIC- [3]

\boxed{Data \:anomaly} is defined as the condition in which all of the data in the database are consistent with the real-world events and conditions.

\red{\large\qquad \qquad \underline{ \pmb{{ \mathbb{ \maltese \: \: Mystique35}}}}}

3 0
3 years ago
I plugged my headphones into my computer, but the sound still came out of the speakers. help!
VARVARA [1.3K]

If you mean speakers. You should remove them or if you mean the speakers in the PC. Perhaps you put the headphones in the wrong one. Theres usually too one in the front and the other one in the back of the desktop.





Hope this helps.


Regards. Shaggy


Enjoy your music!

3 0
3 years ago
Read 2 more answers
Please answer the following essay question:
MArishka [77]
Advertising is a paid promotion that uses strategic planning to target a certain audience. The seven functions of marketing is promotion, selling, product management, marketing information management, pricing, financing, and distribution. Usually you see common advertising such as digital ads, billboards, newspapers, flyers, and more. Advertising can spread awareness, popularize a brand, increase customer demand, and company profits. Advertising is necessary for most- if not all- companies including media outlets, the television industry, search engine companies, and social media websites.
8 0
3 years ago
20 points for ez question lol
slega [8]
I think it might be the third on not certain
5 0
3 years ago
Read 2 more answers
Which of the following statements is not true? Question 16 options: a) SQL is the most popular query language used for interacti
lisov135 [29]

Answer:

The answer to this question is option "d".

Explanation:

In this question option d (A user fills out a form to construct a description of the data desired in a SQL search) is not true. Because SQL stands for Structured Query Language. This is a query language used to communicate with a database and a user fills the form. Which is not possible in the SQL. So the option d is not true.

4 0
3 years ago
Other questions:
  • What portable computing devices, designed for user convenience, have a sensor called an accelerometer that senses vibrations and
    10·1 answer
  • Damian uses a modem to connect to a dial-up network. Which statements are true of a modem?
    11·2 answers
  • A(n) ____ uses the communication interface to request resources, and the server responds to these requests.
    15·1 answer
  • Lester has to create an app that can support offline data and rich media content such as audio and video. In which programming l
    15·1 answer
  • The formula =B2/A2 is inserted into cell C2. Which of the following is true when this formula is copied and pasted into cell C3?
    6·1 answer
  • What alternative to leased lines is used by VPNs? As an alternative to leased lines, VPNs use ______ connections.
    11·1 answer
  • Please help with my Python code - Functions
    9·1 answer
  • Assuming a 32bit processor If I have a double pointer defined as dPtr and I add 1 to it. How many bytes are added to the address
    15·1 answer
  • 5. Javascript can be used for building apps and​
    7·1 answer
  • Why did NFL equip its players with RDIF tags?
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!