Imagine you have a map that represents a phone book until


Imagine you have a Map that represents a phone book. Until now, you stored all (US) phone numbers as the usual 10 digit number. (These numbers do not start with a 0.)

One day, your business partner from London gives you the phone number 44-020-1234-1234, and you realize that you need to add a 1 to the beginning of all existing phone number entries to indicate that they are US phone numbers. (1 is the country code for the US.)

Write the function public static void prependOne(Map m) that adds a 1 to the beginning of each 10-digit BigInteger. Place this function within the utility class PhoneUtil.

Solution Preview :

Prepared by a verified Expert
JAVA Programming: Imagine you have a map that represents a phone book until
Reference No:- TGS02850598

Now Priced at $10 (50% Discount)

Recommended (96%)

Rated (4.8/5)