code: public static String stripSpaces(String s)
      {
          StringBuffer buff = new StringBuffer();
          for(int i = 0; i < s.length(); i++)
          {
              char c = s.charAt(i);
              if(c != ' ')
                  buff.append(c);
          }
          return buff.toString();
      }
docs: Returns the given string with all spaces removed.
  @param s The string to have spaces removed
  @return The given string with all spaces removed