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
coldgirl [10]
4 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]4 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
If you experience a denial-of-service attack, you can use firewall logs to determine the _______ from which the attack originate
suter [353]
<span>The answer is IP address.  If you experience a denial-of-service attack, you can use firewall logs to determine the IP address from which the attack originated.</span>
6 0
3 years ago
Read 2 more answers
In what domain electrica energy is the most use
amm1812

Answer:the main signal bearing entities are voltage and their current in circuit environments.

Explanation:

5 0
3 years ago
How the python programming interesting for non programmers?
aleksandrvk [35]

Answer:

The python programming language is interesting for non-programmers as it is easy to learn the syntax.  It has extensive libraries that can support every action of the non-programmer and programmer.

Explanation:

Python as a programming language has proved to be the easiest to learn and use.  It is also powerful and versatile, making it the best choice for all beginners and experts.  The readability of the Python language also makes it a great first programming language to learn.  It enables one to think like a programmer and not waste time over any confusing syntax.  Another great advantage possessed by the Python language is that it is easy to download and install for use.

6 0
3 years ago
Suppose Host A wants to send a large file to Host B. The path from Host A to Host B has three links, of rates R1 = 500 kbps, R2
Vlad1618 [11]

Answer:

a) 500 Kbps  b) 64 sec  c) 320 sec

Explanation:

a) We define the throughput of a network, as the actual maximum transmission rate that the network is able to deliver, which in this case is equal to the lowest transmission rate of any of the links that the traffic must go through:

R1 =500 kbps

b) If the file size is given in bytes, and we have the throughput in bps, we need to convert to bits first, as follows:

4*10⁶ bytes * (8 bits/byte) = 32*10⁶ bits.

The time needed to transfer the file, will be given by the quotient between the file size and the throughput, as follows:

t = 32*10⁶ bits / 500*10³ bits/sec = 64 sec

c) If the transmission rate R2 is reduced to 100 kbps, R2 becomes the lowest transmission rate in the network, so it becomes the new throughput.

So, the time needed for the same file to be transferred to host B is as follows:

t=  32*10⁶ bits / 100*10³ bits/sec = 320 sec

6 0
3 years ago
The ______ function returns the absolute value of a long int value.
Ksju [112]

Answer:

labs()

Explanation:

The function used to return the absolute value of the integer depends on the type of the integer used.

for the data type int, we can use abs() function.

for data type float, we can use fabs() function.

for data type long int, we can use labs() function.

The meaning of absolute value is to convert negative to a positive value.

for example:

p = -41567L;

labs(p);

it gives the absolute value 41567.

Therefore, the correct answer is labs().

8 0
4 years ago
Other questions:
  • Page _____ refers to whether a page is laid out vertically or horizontally.
    12·1 answer
  • What is a type of destructive program?
    8·2 answers
  • As a computer science student, which career you will select and what do you predict about the future of that specific IT-Career.
    8·1 answer
  • What do commercial websites use to estimate a visitor's age, gender, and zip code?
    10·1 answer
  • Blender is used by which video game team member?
    15·1 answer
  • What is the name of the top-level parentless folder in a digital file system?
    8·1 answer
  • How can an attacker execute malware through a script?
    15·1 answer
  • What are two drawbacks of using netbook ? (Choose two)
    8·1 answer
  • Briefly explain the importance of doing backup in systems administration and explain in detail any three methods for performing
    7·1 answer
  • are there any hexadecimal digits that cannot be created using 4 bits? how many bits would you need to represent the hexadecimal
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!