code: public String[] getKeysAsStrings(Map<String, ?> map) {
          String[] result = null;
          Set<String> keySet = map.keySet();
          int keySize = keySet.size();
          if (keySize > 0) {          
              result = keySet.toArray(new String[keySize]);
          }
          
          return result;
      }
docs: Get the array of all keys in the given map as strings. This assumes that
  each key in the given map is a String.
  
  @param map The map to get the keys from
  
  @return The array of all keys in the map as strings