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
Alisiya [41]
3 years ago
7

Using the merge method of the Map interface, which statement correctly updates the salesTotalByDept map of type Map to update th

e sales total for a dept by an integer sales value? Question 3 options: salesTotalByDept.merge(dept, sales,(d,s) -> s + 1); sales.merge(salesTotalByDept, dept, (d,s) -> s + sales); dept.merge(salesTotalByDept, sales, (d,s) -> s + sales); salesTotalByDept.merge(dept, sales, (d,s) -> s + sales);
Computers and Technology
1 answer:
Alexxandr [17]3 years ago
7 0

Answer:

salesTotalByDept.merge(dept, sales, (d,s) -> s + sales);

Explanation:

In the above statement merge() method is being used which updates the salesTotalByDept map of type Map to update the sales total for a dept by an integer sales value.

Here dept and sales both are used and passed as a parameter to merge() method because salesTotalByDept can be update if both the information about sales and department are provided.

Map.merge() method is used to place new value under the given key if the key does not correspond to any value, or is used to update existing key with a given value.

You might be interested in
Assume:
kobusy [5.1K]

Answer:

?

Explanation:

8 0
3 years ago
Can anybody tell me how to screenshot on a PC with no "print screen" button?
Liono4ka [1.6K]

There is a extension from google chrome webstore that allows to take a screnshot

8 0
3 years ago
Instructions:Select the correct answer.
balandron [24]
The answer is installing antivirus software
3 0
3 years ago
URGENT!
lutik1710 [3]

<u>Explanation:</u>

Hey there! you need not to panic about it ,your program didn't have Driver program i.e main program! the correct & working code is given below:

// C++ program to count  even digits  in a given number .

#include <iostream>  

using namespace std;  

// Function to count digits

int countEven(int n)  

{  

int even_count = 0;    

while (n > 0)  

{  

 int rem = n % 10;  

 if (rem % 2 == 0)  

  even_count++;  

 n = n / 10;  

}  

cout << "Even count : "

 << even_count;  

if (even_count % 2 == 0 )  

 return 1;  

else

 return 0;  

}  

// Driver Code  

int main()  

{  

int n;  

std::cin >>n;

int t = countEven(n);  

return 0;  

}  

6 0
3 years ago
A set of connected ideas supported by examples is ?
andrezito [222]

Answer:

Argument

Explanation:

<u>Argument</u> - A set of connected ideas, supported by examples, made by a writer to prove or disprove a point.

5 0
3 years ago
Read 2 more answers
Other questions:
  • 4
    10·1 answer
  • Give an example of a language L such that |L|=5 and |L^2|=16.
    5·1 answer
  • Solve the recurrence relation.<br> S(1)=1<br> S(n)= S(n-1)+(2n-1) for n&gt;=2
    13·1 answer
  • What are horizontal and vertical page break? how and where are these inserted?​
    10·1 answer
  • What is the difference between = and == in terms of java..?
    6·2 answers
  • PLEASE ANSWER FAST, WILL GIVE BRAINLIEST AND 20 POINTS
    11·2 answers
  • What are examples of templates the Input Mask Wizard offers? Check all that apply.
    12·2 answers
  • Why do computers use binary code?
    12·2 answers
  • Write a program to Test if mold is stored in the variable word.
    5·1 answer
  • Read-only memory chips are used to
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!