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
Kruka [31]
3 years ago
14

Consider the code block below. What is the value of amount when this method is called twice, the first time using cookieJar(7) a

nd then using cookieJar(22)?
public static int cookieJar(int addCookies) {

int amount = 0;
amount += addCookies;
return amount;

}
A. 7
B. 15
C. 22
D. 29
E. An error occurs

Computers and Technology
1 answer:
RUDIKE [14]3 years ago
3 0

Answer:

C. 22

Explanation:

Given that the argument is being passed by value, there is no memory to consider.  So cookieJar(7) returns 7 and cookieJar(22) returns 22.

If the argument parameter was passed by reference or pointer, then perhaps the value from cookieJar(7) would be considered with cookieJar(22).

Note, this code block really isn't doing anything other than returning the value passed into it.  The "amount" variable is immediately set to 0, and then the value passed in is added to amount (which is 0), and returns.  The following code could replace this function:

public static int cookieJar(int addCookies){

return addCookies;

}

The above code will return an equivalent output to the given code.

Notice, the function is not dependent on any previous call, so the value for each is unique to the call itself, i.e., cookieJar(22) returns 22 and cookieJar(7) returns 7.

So, C. 22 would be correct.

You might be interested in
OBJECTIVE QUESTIONS
oee [108]

Answer:

A modifier

Explanation:

because this modified a computer keyboard

8 0
2 years ago
Uses of the following button in a keyboard: Prt SC, Home, Shift, Tab, Pg Up.​
creativ13 [48]

Answer:

This Print Screen key is used to take the screenshots of all that is appearing on the screen, and this can then be pasted in paint and saved in some location of the computer.

The Home key takes the cursor from the current position to the top left, or the start of the file.

Shift: There are two shift keys. And they are used to print the character in the capital. And when the caps lock is busy it can be used to print in lower case. It is also used together with arrow keys to select a part of the text.

Tab: This key moves the cursor from the current location to the location which we know as tab stops ( and the very next one).

Pg Up:​ The page up is being used for scrolling up, and the distance to which limit the scrolling will take place depends upon the application you are working on.

Explanation:

Please check the answer.

4 0
3 years ago
What is the empty space inside the character 'O' called?
mariarad [96]

Answer:

In typography, a counter is the area of a letter that is entirely or partially enclosed by a letter form or a symbol (the counter-space/the hole of). The stroke that creates such a space is known as a "bowl".

7 0
3 years ago
Explain the developments RAM since it was created in 1968 til today.
xenn [34]

Answer:

From DRAM to DDR4

Explanation:

RAM stands for <em>Random Access Memory.</em> In 1968, Mr. Robert Dennard at IBM's Watson Research obtained the patent for the one-transistor cell that will eventually substitute the old magnetic core memory allocated in computers of the time. By 1969 Intel released the TTL bipolar 64-bit SRAM (Static Random-Access Memory) as well as the ROM "Read Only Memory"; also in 1969 it evolved into "<em>Phase - change memory - PRAM - </em>". However this evolution was not commercialized, Samsung expressed its interest in developing it. In 1970 the first DRAM product was commercially available; it was developed by Intel. In 1971 it was patented EPROM; in 1978 George Perlegos developed EEPROM.

By 1983 a nice breakthrough happened with the invention of SIMM by Wang Labs. In 1993 Samsung came up with KM48SL2000 synchronous DRAM (SDRAM), this variation soon turned into an inductry standard.

In 1996 DDR began a revolution in the memory sector, then in 1999 RDRAM. Both DDR2 SDRAM. DDRR3 and XDR DRAM were commercialized. Finally in 2007 and 2014 the developments of DDR3 and DDR4 were available for the general public.

6 0
3 years ago
A _____ software system determines the steps needed to produce components and instructs the machines that do the work.
konstantin123 [22]

Answer:

A computer-aided manufacturing or (cam) software system

Explanation:

Hope I could help :)

8 0
3 years ago
Other questions:
  • A DSLR camera is made up of two parts. They are
    13·2 answers
  • How is a cell named?
    9·1 answer
  • Which technology was used in fourth generation of computer​
    13·2 answers
  • In terms of object-oriented programming, after a class is defined,
    11·1 answer
  • I have a problem with Instagram.
    11·1 answer
  • 1. Which of the following statements are true about routers and routing on the Internet. Choose two answers. A. Protocols ensure
    9·2 answers
  • What is social media ​
    13·2 answers
  • Kylee needs to ensure that if a particular client sends her an email while she is on vacation, the email is forwarded to a
    5·1 answer
  • Match the parts of the website address with its correct explanation. http://www.usa.gov/Agencies/federal.shtm/​
    5·2 answers
  • Which type of inventory control is expensive but helps keep inventory especially secure? A. RFID tags B. Barcodes C. Visual merc
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!