Question: Write a method called subMap that accepts two maps from strings to strings as its parameters and returns true if every key in the first
Write a method called subMap that accepts two maps from strings to strings as its parameters and returns true if every key in the first map is also contained in the second map and maps to the same value in the second map. For example, {Smith=949–0504, Marty=206–9024} is a submap of {Marty=206–9024, Hawking=123–4567, Smith=949–0504, Newton=123–4567}. The empty map is a submap of every map.
Step by Step Solution
3.44 Rating (154 Votes )
There are 3 Steps involved in it
public static boolean subMap Ma... View full answer
Get step-by-step solutions from verified subject matter experts
