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
Match each of the following terms to its definition: I. web-based II. open source III. project management IV. personal informati
11111nata11111 [884]

Answer:

A. Personal information manager.

B. Web-based.

C. Project management.

D. Proprietary.

E. Open source.

Explanation:

A software can be defined as a set of executable instructions (codes) or collection of data that is used typically to instruct a computer how to perform a specific task and to solve a particular problem.

Simply stated, it is a computer program or application that comprises of sets of code for performing specific tasks on the system.

Basically, softwares are categorized into the following categories;

A. Personal information manager: software used to keep track of appointments. It can be used to schedule and manage schedules easily.

B. Web-based: software that is hosted on a website. It works based on cloud computing services and as such requires the use of internet for use at all times.

C. Project management: software used to track tasks and coordinate resources.

D. Proprietary: software which must be purchased. It also known as a closed-source software and can be defined as any software application or program that has its source code copyrighted and as such cannot be used, modified or distributed without authorization from the software developer. Thus, it is typically published as a commercial software that may be sold, licensed or leased by the software developer (vendor) to the end users with terms and conditions.

Some examples of proprietary software are Microsoft Windows, macOS, Adobe photoshop etc.

E. Open source: software code that is freely available. It is typically published as a free software that may be downloaded on various platforms by the end users.

6 0
3 years ago
Which of the following is defined as the elastic leasing of pooled computer resource over the Internet? 1) Broadband 2) Wiki 3)
garri49 [273]

The cloud is defined as the elastic leasing of pooled computer resource over the Internet.

Many companies currently use the cloud to store their information and infrastructure instead of leaving it on the physical computer. As time passes, more companies have continuously started to store their information on the cloud. Predictions show that in the future, nearly all companies will use this to store information.

7 0
3 years ago
A method signature for a method consists of all elements of the method except the body. That is, a method signature consists of
Bess [88]
To be honest I feel like it’s B that’s looks and seems the most correct to me
8 0
3 years ago
What is a biometric scanner?
Lisa [10]
<span>an electronic device used to determine a person's identity by detecting and matching the person's physical features, such as fingerprints or the eyes, to a database</span>
3 0
4 years ago
Read 2 more answers
What are five don’ts of using a computer
Sonja [21]

Answer:

well, as long as there are no right or wrong answers, don't:

look to closely at the screen, as it may mess up your eyes

hold a drink above the computer, as it may spill and cause "sticky keys"

go to sites that you know will give your a computer a virus, cause they cost hundreds of dollars to repair, and some aren't able to come out

go on illegal sites/do illegal operations to the computer itself, because then you won't have a computer

Explanation:

3 0
3 years ago
Read 2 more answers
Other questions:
  • It is not possible to convert a numbered list to a bulleted list in Word 2007. T or F
    13·1 answer
  • Jerry is making an address book using a digital database. He has a list of his immediate family and friends but wants to add a f
    9·2 answers
  • Most Internet users access commercial websites, which have higher-quality information because of higher editing standards and th
    12·1 answer
  • How does recorded audio stay on an audio tape
    12·1 answer
  • Write JavaScript code to declare a variable of the name favoriteColor
    13·1 answer
  • "Rights and duties are two sides of the same coin." Explain with examples​
    5·1 answer
  • _______________ is a computer networking protocol used by hosts to retrieve IP address assignments.
    11·1 answer
  • You defined a class and saved it as shoe.py.
    5·2 answers
  • Anne wants to hide her age by converting it from 13 to 1101. Which number system is Anne converting to?
    13·1 answer
  • The following statements regarding centralized administration concepts are presented to you in an interview in which only one of
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!