Question #111894

What value(s) will be output by the following Java code statements?

System.out.println( Math.abs( -5.2 ) ); _________________

System.out.println( Math.pow( 4, 2 ) ); _________________

System.out.println( Math.pow( 2, 5 ) ); _________________

Expert's answer

System.out.println( Math.abs( -5.2 ) ); --> 5.2

System.out.println( Math.pow( 4, 2 ) ); --> (double) 42 --> 16.0

System.out.println( Math.pow( 2, 5 ) ); --> (double) 25 --> 32.0



Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

LATEST TUTORIALS
APPROVED BY CLIENTS