public static String pad(int padding){
  if (padding > 0) {
    StringBuffer sb=new StringBuffer(padding);
    for (int i=0; i < padding; i++) {
      sb.append(' ');
    }
    return sb.toString();
  }
 else {
    return "";
  }
}

public static String pad ( int padding ) { if ( padding > 0 ) { StringBuffer sb = new StringBuffer ( padding ) ; for ( int i = 0 ; i < padding ; i ++ ) { sb . append ( ' ' ) ; } return sb . toString ( ) ; } else { return "" ; } }
returns a string with the given number of spaces .
