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. Your code should work with an empty map too.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
