answer.
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
coldgirl [10]
2 years ago
15

Assume that the following method header is for a method in class A.public void displayValue(int value)Assume that the following

code segments appear in another method, also in class A. Which contains a legal call to the displayValue method?Select one:a. int x = 7; displayValue(int x);b. int x = 7; displayValue(x)c. int x = 7; void displayValue(x);d. int x = 7; displayValue(x);
Computers and Technology
1 answer:
Ksenya-84 [330]2 years ago
8 0

Answer:

d. int x = 7; displayValue(x);

Explanation:

Only option D is correct.

The declaration of the method displayValue() has a single int parameter.

When this method is called an int value is to passed as an argument terminated with a semi colon as given in option D.

  • Option A displayValue(int x); is wrong because it declaring x again at the method call
  • Option B displayValue(x) has a syntax error "Missing semi colon"
  • Option C void displayValue(x); is wrong, when calling a function its return type is not written.
You might be interested in
Assume a program requires the execution of 50 x 106 FP instructions, 110 x 106 INT instructions, 80 x 106 L/S instructions, and
Molodets [167]

Explanation:

FP - 50 \times 10^6

CPI - 1

INT -110 \times 10^6,

CPI - 1

I/S - 80 \times 10^6 ,

CPI - 4

Branch - 16 \times 10^6

CPI - 2

Clock Speed - 2 \times 10^9

Time(old) =\frac{50 x 10^6 + 110 x 10^6 + 4 x ( 80 x 10^6) + 2 x (16 x 10^ 6)}{2 x 10^9}

Time(old) = 256 \times 10^ {-3}

Time(new) =  \frac{256 \times 10^{-3}}{2}

                = 128 \times 10^{-3}

                =\frac{CPI(new) x [50 x 10^6 + 110 x 10^6 + 4 x ( 80 x 10^6) + 2 x (16 x 10^ 6)]}{2 x 10^9}

                =  128 \times 10^{-3}

CPI(new) = \frac{-206}{50}

               = -4.12

3 0
2 years ago
Effective character encoding requires:
lidiya [134]

To answer your question the answer would be B compatible browsers

4 0
2 years ago
Charlotte has set up a home maintenance service that operates out of her city. Workers commit to being available for certain hou
Vinvika [58]

Answer:

MAN

Explanation:

3 0
2 years ago
The problem solving process begins by first ______ the problem.
alexandr402 [8]

Answer:

identifying/acknowledging

Explanation:

7 0
2 years ago
Which of the following is a benefit, as well as a risk, associated with client/server networks?
KATRIN_1 [288]
C would be the correct answer to this question
6 0
2 years ago
Other questions:
  • Allows you to manually add an entry to the arp cache that resolves the ip address inetaddr to the physical address etheraddr. wh
    13·1 answer
  • Which type of address is used at the transport layer to identify the receiving application?
    14·1 answer
  • There are two methods of enforcing the rule that only one device can transmit. In the centralized method, one station is in cont
    5·1 answer
  • Consider the formula: G=D+(A+C^2)*E/(D+B)^3 Show the order that a processor would follow to calculate G. To do so, break down th
    10·1 answer
  • Write a method that accepts a String object as an argument and displays its contents backward. For instance, if the string argum
    10·1 answer
  • You need to design a data storage scheme for Hayseed Heaven library data system. There are several hundred thousand large data r
    8·1 answer
  • Describe the indicators and hazards of a metal deck roof fire in an unprotected steel joist warehouse as well as the techniques
    6·1 answer
  • You modify a document that is saved on your computer. Where are the changes stored until you save the document again?
    12·1 answer
  • Why is it important for element IDs to have meaningful names?
    11·1 answer
  • Match each scenario to the absolute value expression that describes it. 1. the distance moved when going backwards five spaces i
    13·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!