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
Nonamiya [84]
3 years ago
6

Consider the following code: public static void mystery(int a) { System.out.println("A"); } public static void mystery(double a)

{ System.out.println("B"); } public static void mystery(int a, double b) { System.out.println("C"); } public static void mystery(double a, int b) { System.out.println("D"); } What is output by the following? mystery(7);
Computers and Technology
1 answer:
Feliz [49]3 years ago
3 0

Answer:

The output is "A"

Explanation:

public class Solution {

   public static void main(String args[]) {

     mystery(7);

   }    

   public static void mystery(int a) { System.out.println("A"); }    

   public static void mystery(double a) { System.out.println("B"); }    

   public static void mystery(int a, double b) { System.out.println("C"); }    

   public static void mystery(double a, int b) { System.out.println("D"); }

}

In the code above; mystery is defined in four different ways called method overloading. Method overloading is when same method is defined with different parameters.

In the first case; mystery will be called if the argument is int.

In the second case; mystery will be called if the argument is double.

In the third case; mystery will be called if the arguments are int and double.

In the fourth case; mystery will be called if the arguments are double and int.

When mystery(7) is called; the mystery method requiring only int will be called and the output is "A".

You might be interested in
Patrick manages the cloud services that are used by a small hospital system. He knows that there are a lot of laws and regulatio
svet-max [94.6K]

Answer:

a. HIPAA

Explanation:

HIPPA represents the Health Insurance Portability and Accountability Act that of the United States which becomes mandatory for protecting the medical data in any form.

Also in the case of data protection that represent the general regulations, PCI DSS, GDPR etc would be used

So the option a is correct

hence, all the other options are wrong

8 0
3 years ago
les agrees to install a new hard drive and software on marilee's computer in exchange for four of her used textbooks. after he i
WARRIOR [948]

Marilee can sue for breach of contract, because Les had a preexisting duty to do all of the work.

What is hard drive ?

The physical device that houses all of your digital stuff is a hard disk. Digital stuff that is kept on a hard drive includes your papers, photos, music, videos, applications, application preferences, and operating system. There are internal and external hard drives.

What is software?

Software is a collection of instructions, data, or computer programs that are used to run machines and carry out particular activities. It is the antithesis of hardware, which refers to a computer's external components. A device's running programs, scripts, and applications are collectively referred to as "software" in this context.

What does running program means?

Double-click the executable file or the shortcut icon pointing to the executable file on Windows to start the program. If you find it difficult to double-click an icon, you can highlight it by clicking it once and then using the Enter key on the keyboard.

Learn more about hardware and software click here:

brainly.com/question/24231393

#SPJ4

8 0
9 months ago
What are chemical manufacturers required to provide to anyone who purchases or uses their chemicals for a work purpose? Select a
Julli [10]

Answer:

Labels and Safety Data Sheets.

Explanation:

Label is a short description of what is inside the container. And Safety Data Sheets has everything that is required. You have precautionary measures listed as well as the training details in the safety data sheets. The training PPE is hence not required definitely. However, the only other thing required is the label, as without that you will not come to know what is inside the container from outside. Hence, the above answer.

8 0
2 years ago
Read 2 more answers
HELP ASAP 40 POINTS & BRAINLIST (ONLY RIGHT ANSWERS) Enrique is trying to decide which college is the best for his career ch
erma4kov [3.2K]

b.Enrique will probably have to pay a high tuition if he doesn’t earn a scholarship or grant.


7 0
3 years ago
Read 2 more answers
Which detail should be included in a summary about the passage check all that apply in warm rivers play role in arctic sea ice m
SSSSS [86.1K]

Answer:

A. Warm water is melting the Arctic Sea ice.

C. The sudden flow of warm waters into the sea are rapidly warming the ocean's surface.

Explanation:

ed2020

5 0
2 years ago
Other questions:
  • Consider the following method: public static void arrayMystery(int[] array) { for (int i = 0; i < array.length - 1; i++) { if
    10·1 answer
  • Open a command prompt on PC1. Issue the command to display the IPv6 settings. Based on the output, would you expect PC1 to be ab
    7·1 answer
  • _____ software can help a company manage security, enforce corporate strategies, and control downloads and content streaming fro
    11·1 answer
  • User-system interaction is?
    11·1 answer
  • at the bank there is 4 lines with 7 costumers and there are five customers left over. how many customers are there​
    12·1 answer
  • I live in Alabama and I’m ab to leave to go on a 3 week trip to France and I’m wondering how I can get LTE for my IPhone 6s Plus
    15·2 answers
  • Lee has changed the style of his table to make the header row stand out. Next, he wants to center the text in the header row and
    11·2 answers
  • The Ocean Medallion is a wearable device that connects virtually to various devices on board a cruise ship. When a guest is wear
    14·1 answer
  • Can someone be my friend,don't friend me until i ask you Questions
    14·1 answer
  • True/False: Each individual element of an array can be accessed by the array name and an element number, called a subscript. Tru
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!