Skip to Content
0
Former Member
Jun 11, 2009 at 05:26 PM

Output array in UDF

1562 Views

Experts;

below is code: i want to return back array;

it doesnt throw any error but it gives output as [Ljava.lang.String;@4a4cd40b..

public void collectSICCODE(String[] cod, ResultList result, Container container) throws StreamTransformationException{

       String[] myArray = new String[cod.length];

        for( int i=0; i<cod.length; i++)
       {
            myArray<i> = cod<i>; // assign the value to index i, replace ""+i with your value.
        }
   result.addValue(myArray);

}