comefrom: <awangdev>43. Multiply Strings_5.java
code: public String multiply(String num1, String num2) {
          if (num1 == null || num2 == null) {
              return "";
          } else if (num1.length() == 0 || num2.length() == 0) {
              return num1.length() == 0 ? num2 : num1;
          } else if (num1.equals("0") || num2.equals("0")) {
              return "0";
          }
          num1 = new StringBuffer(num1).reverse().toString();
          num2 = new StringBuffer(num2).reverse().toString();
       
          int[] product = new int[num1.length() + num2.length()];
          
          for (int i = 0; i < num1.length(); i++) {
          	int a = num1.charAt(i) - '0';
              for (int j = 0; j < num2.length(); j++) {
              	int b = num2.charAt(j) - '0';
                  product[i + j] += a * b;
              }
          }
          
          StringBuffer sb = new StringBuffer();
          for (int i = 0; i < product.length; i++) {
             	int number = product[i] % 10;
             	int carrier = product[i] / 10;
             	sb.append(number);
              if (i < product.length - 1) {
                  product[i + 1] += carrier;
              } 
          }
          sb.reverse();
          while (sb.length() > 0 && sb.charAt(0) == '0') {
          	sb.deleteCharAt(0);
          }
  
          return sb.toString();    
      }
masked: public String var_0 ( String var_1 , String var_2 ) {
    if ( var_1 == null || var_2 == null ) {
      return "" ;
    }
    else if ( var_1 . length ( ) == 0 || var_2 . length ( ) == 0 ) {
      return var_1 . length ( ) == 0 ? var_2 : var_1 ;
    }
    else if ( var_1 . equals ( "0" ) || var_2 . equals ( "0" ) ) {
      return "0" ;
    }
    var_1 = new StringBuffer ( var_1 ) . reverse ( ) . toString ( ) ;
    var_2 = new StringBuffer ( var_2 ) . reverse ( ) . toString ( ) ;
    int [ ] var_3 = new int [ var_1 . length ( ) + var_2 . length ( ) ] ;
    for ( int var_4 = 0 ;
    var_4 < var_1 . length ( ) ;
    var_4 ++ ) {
      int var_5 = var_1 . charAt ( var_4 ) - '0' ;
      for ( int var_6 = 0 ;
      var_6 < var_2 . length ( ) ;
      var_6 ++ ) {
        int var_7 = var_2 . charAt ( var_6 ) - '0' ;
        var_3 [ var_4 + var_6 ] += var_5 * var_7 ;
      }
    }
    StringBuffer var_8 = new StringBuffer ( ) ;
    for ( int var_4 = 0 ;
    var_4 < var_3 . length ;
    var_4 ++ ) {
      int var_9 = var_3 [ var_4 ] % 10 ;
      int var_10 = var_3 [ var_4 ] / 10 ;
      var_8 . append ( var_9 ) ;
      if ( var_4 < var_3 . length - 1 ) {
        var_3 [ var_4 + 1 ] += var_10 ;
      }
    }
    var_8 . reverse ( ) ;
    while ( var_8 . length ( ) > 0 && var_8 . charAt ( 0 ) == '0' ) {
      var_8 . deleteCharAt ( 0 ) ;
    }
    return var_8 . toString ( ) ;
  }
  