question: public static double [ ] stringToDoubleArray ( String str ) { if ( str == null ) { return ( null ) ; } String [ ] array = str . split ( "," ) ; if ( array . length == 0 ) { array = new String [ ] { str . trim ( ) } ; } double [ ] nArray = new double [ array . length ] ; for ( int i = 0 ; i < nArray . length ; ++ i ) { nArray [ i ] = Double . parseDouble ( array [ i ] ) ; } return ( nArray ) ; }
target:  Convert a string to a double array