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
kifflom [539]
3 years ago
9

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:
Alex787 [66]3 years ago
4 0

Answer: 29

Explanation:

The variable amount is given a initial value of 0

Therefore, the first method call:

cookieJar(7)

amount + cookieJar

amount = 0 + 7 = 7

And the value of 7 is returned for amount at the start of the block

Thus, when cookieJar is called the second time ;

cookieJar(22)

amount + cookieJar

amount = 7 + 22 = 29

And the value of 29 is returned for amount at the start of the block

You might be interested in
Assignment 6: Animation
maw [93]

Answer:

huh?

Explanation:

what is assignment 6: animation?

7 0
3 years ago
What does FTTB mean?
EleoNora [17]

  • <em><u>Fiber to the building</u></em>

Explanation:

  • <em><u>Fiber to the building</u></em><em><u> </u></em><em>is a type of fiber-optic cable installation where the fiber cable goes to a point on a shared property and the other cabling provides the connection to single homes, offices or other spaces.</em>

<h2><em>hope </em><em>it</em><em> helps</em><em>!</em></h2>
3 0
3 years ago
The Company should use BLANK cables to provide Fast connectivity without electrical interference
Lisa [10]

they should use Ethernet! it offers fast and easy setup, and is just plug and play!

3 0
3 years ago
What is gland? mention it's type​
stealth61 [152]

Answer:

Gland is an organ that makes one or more substances, such as hormones, digestive juices, sweat, tears, saliva, or milk.

TYPES OF GLANDS :

ENDOCRINE glands release the substances directly into the bloodstream.

EXOCRINE glands release the substances into a duct or opening to the inside or outside of the body.

BRAINLIEST PLEASE

5 0
3 years ago
Read 2 more answers
Which ipv6 header field is known as the priority field?
Yuki888 [10]
<span>Traffic Class header field is known as the priority field.</span>
4 0
3 years ago
Read 2 more answers
Other questions:
  • This toolbar has icons representing the application's basic operations such as Save and Copy. Drawing Formatting Standard Task
    11·2 answers
  • Sara has a habit of stealing money from her brother Charlie. When he found out, Charlie rebuked Sara in the presence of his frie
    11·1 answer
  • Write down the pseudo code of a program that calculates the Body Mass Index (BMI) of
    9·1 answer
  • What tasks does google do?
    5·1 answer
  • A(n) ____ string contacts the data source and establishes a connection with the database using the Data Source Configuration Wiz
    5·1 answer
  • Find the max and min of a set of values using recursion Find the max and min of a set of values using recursion. First input the
    5·1 answer
  • Find the output<br>I need it immediately​
    15·1 answer
  • The current annual interest rate is 5 percent, and you are taking out a 20-year loan with a monthly end-of-month payment. If you
    5·1 answer
  • How are most databases organized?
    15·1 answer
  • Which device allows users to directly hear data from a computer
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!