public static String trim(final String string){
  String result=null;
  if (string == null) {
    result=BLANK;
  }
 else {
    result=string.trim();
  }
  return result;
}

public static String trim ( final String string ) { String result = null ; if ( string == null ) { result = BLANK ; } else { result = string . trim ( ) ; } return result ; }
when string is null return blank , where the string is not null it return string . trim
