predict the output and give answer
Attachments:
Answers
Answered by
0
Answer:
z = 5.00
Explanation:
on third line declared variables of double type then
assigned x to 3 and y to 4
on 6th line calling sqrt method in Math class which was already created in java.lang package
for to find square root of number and it will return value in double data type
we are sending (3*3+4*4) = (9+16)= 25 to method
then it caluclate √25 = 5
return 5 to z .z will store it in double form like 5.00.
and on nextline printing value z=5
Similar questions