Ask your own question, for FREE!
Computer Science 19 Online
OpenStudy (anonymous):

Please help.... Complete the following program so that it computes and writes out the element in the array that is closest to zero. import java.io.* ; class NearlyZero { public static void main ( String[] args ) { int[] data = {3, 1, 5, 7, 4, 12, -3, 8, -2}; // declare and initialize variables // find the element nearest to zero for ( ) { } // write out the element nearest to zero System.out.println( ); } }

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!