Find accurate and reliable answers to your questions on IDNLearn.com. Discover comprehensive answers from knowledgeable members of our community, covering a wide range of topics to meet all your informational needs.
Consider the code block below. What is the value of amount when this method is called twice, the first time using cookieJar(7) and 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
