question: public static double max ( double [ ] data ) { double max = Double . NaN ; for ( int i = 0 ; i < data . length ; i ++ ) { if ( Double . isNaN ( data [ i ] ) ) continue ; if ( Double . isNaN ( max ) || data [ i ] > max ) max = data [ i ] ; } return max ; }
target:  Find the maximum of all elements in the array, ignoring elements that are NaN.