Q. What is the output of System.out.println(Math.pow(2, 3));?

A
6
B
8.0
C
9
D
2.0
Solution:

Math.pow() raises a number to a power, so 2^3 = 8.0 (returned as a double).

Entri Contact Image

Get Expert Advice for Free: Register for Your Free Consultation Now!