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
erma4kov [3.2K]
4 years ago
5

Consider the following method.

Computers and Technology
1 answer:
dimaraw [331]4 years ago
5 0

Answer:

The answer to this question is given below in the explanation section.

Explanation:

Consider the following method.

public double secret(int x, double y)

{

return x/2.0;

}

The return type of this function is double, so where it will store the result in a variable, that variable should be of double type. So, among given options, the correct option is double result = secret(4, 4.0);

All others options are incorrect and will give the error.

for example:

int result = secret(4, 4);

in it, the function secret is accepting first integer and second double parameters, while you are passing all integer variables.

int result = secret(4, 4.0);

you are not allowed to store double value into integer.

double result = secret(4.0, 4.0); in it you are passing incorrect types of parameter.

You might be interested in
As text is typed in the _____ text box, a drop-down list displays options for completing the action, displaying information on t
pickupchik [31]

Answer:

Excel Help

Explanation:

Press F1 key to open the excel help window

Or you can also click the excel help button to launch the help window.

Type for whatever you are seeking help for and you will notice suggestions as you type something. These suggestions include online and offline results. If there are too many results then try searching offline it will narrow down the results.

After typing the text and hitting enter, the excel help returns several related topics on the searched query. You can browse through these topics and get help from excel.

5 0
3 years ago
How can I get multiple user inputs in Java ? I want to be able to use it for subtraction, addition,division and multiplication.F
Evgesh-ka [11]
You can do something like this :

Scanner sc = new Scanner(System.in);
int[] nums = new int[4];

for(int i = 0; i < nums.length; i++) {
System.out.println("Enter next number: ");
nums[i] = sc.nextInt();
7 0
2 years ago
10. A loop statement is given as:
nirvana33 [79]

Answer: a. None

Explanation:

The loop will not run as the condition always returns false.

i=10 and the condition given: i<10 which is false always. So, the loop will not run.

8 0
3 years ago
In what year was the first phone using the android operating system sold in the united states?
inn [45]
In 2008 was when the first android operating system was sold in the United States.
8 0
3 years ago
In two to four sentences, describe how you would select a function.
Mila [183]

Explanation:

As a result, it is important not to overlook any of the sources of information that indicate what the form of the model should be. Answer Not ...

Knowing Function Types Helps: Another helpful ingredient in model selection

5 0
3 years ago
Other questions:
  • If images around the edges of a monitor do not look right, the computer might have a(n) access problem. hardware problem. Intern
    13·2 answers
  • Computer security:
    15·1 answer
  • What is the film format that many filmmakers feel is superior to any other format?
    13·1 answer
  • To delete a row, you must first
    11·1 answer
  • See the answerWrite a setInterval() function that increases the count by 1 and displays the new count in counterElement every 30
    11·1 answer
  • Which of the following describes an executive information system (EIS)?
    11·1 answer
  • When is the greatest risk of damage from electrostatic discharge?
    7·2 answers
  • Explain how a magnetic hard disk drive (HDD) operates.
    12·1 answer
  • To keep files organized, related documents are often stored in ____ (also called directories) located on the storage medium.
    11·1 answer
  • 2. Why do you think the order of operations still applies in Java? Give an example to show what could happen if you didn't use o
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!