Write a static method named conflicts that takes two Maps using Strings as keys
ID: 3676841 • Letter: W
Question
Write a static method named conflicts that takes two Maps using Strings as keys and Integers as values. The method should return a Set of Strings. The Set returned by conflicts should be a list of all of the keys that are in conflict between the two Maps. A conflict occurs when two keys point to a different value in the two different maps. (For example, map1 might have the key "Apple" pointing to the Integer 12 and map2 might have the key "Apple"pointing to the Integer 15 - the key "Apple" would need to be added to the Set of conflicts returned by the method). (using Java)
Explanation / Answer
Main.java
output:
[Apple]
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.