Write a method called is1to1 that accepts a map whose keys and values are strings as its
Question:
Write a method called is1to1 that accepts a map whose keys and values are strings as its parameter and returns true if no two keys map to the same value. For example, {Marty=206–9024, Hawking=123–4567, Smith=949–0504, Newton=123–4567} should return false, but {Marty=206–9024, Hawking=555–1234, Smith=949–0504, Newton=123–4567} should return true. The empty map is considered 1-to-1 and returns true.
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Related Book For
Building Java Programs A Back To Basics Approach
ISBN: 9780135471944
5th Edition
Authors: Stuart Reges, Marty Stepp
Question Posted: