code: public static String toTitleCase( final String camel )
      {
          if (camel==null) {
              return null;
          }
          StringBuffer    buffer = new StringBuffer( camel.length() + 10 );
          char            ch;
  
          //      TBD: needs refactoring, cleanup, method cohesiveness, SRP.
          for ( int ii = 0; ii < camel.length(); ii++ )
          {
              ch = camel.charAt( ii );
  
              //
              //      This will handle lower camel and avoid adding a
              //          space at the start
              //
              if ( ii == 0 )
              {
                  if ( Character.isLowerCase( ch ) )
                  {
                      buffer.append( Character.toUpperCase( ch ) );
                  }
                  else
                  {
                      buffer.append( ch );
                  }
              }
              else
              {
                  if ( Character.isUpperCase( ch ) )
                  {
                      buffer.append( " " ).append( ch );
                  }
                  else
                  {
                      buffer.append( ch );
                  }
              }
          }
  
          return buffer.toString();
      }
docs: Converts a string from camel to title case. e.g. "TheTitleOfThisThing"
  becomes "The Title Of This Thing" It also handles lower camel case too so
  that "theTitleOfThisThing" will give the same result
  
  @param camel case String
  @return title case String