Limited access

Upgrade to access all content for this subject

Consider the following code segment.

double a=-2.0, b=3.0;
double num = Math.sqrt(Math.pow(a, Math.abs(a))) * Math.sqrt(Math.abs(Math.pow(a,b))/2)*-3;
System.out.println(num);

What is output to the console when this code segment is executed?

A

12.0

B

6.0

C

-0.7

D

-6.0

E

-12.0

Select an assignment template