How do you calculate roots in java?



How do you calculate roots in java?..

Answer / Veenesh Kumari

To find square root, use Math.sqrt(number). For other roots, such as cube root (nth root), use the following code snippet: Math.pow(number, 1/n).

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Core Java Interview Questions

Can we define private and protected modifiers for variables in interfaces?

1 Answers  


why we write public static void main (String args[]) in core java plz explain briefly??????????????????

3 Answers   HCL,


What is final keyword in java?

1 Answers  


List some important features of java 10 release?

1 Answers  


When is finally block not called?

1 Answers  


How many times finalize method will be invoked? Who invokes finalize() method in java?

1 Answers  


Difference between abstract and concrete class ?

1 Answers  


What is boolean in java?

1 Answers  


What is multi level inheritance in java?

1 Answers  


List some features of the abstract class.

1 Answers  


what is the output ? Math.floor(-2.1) a)2 b)-2 c)-3.0 d)0

4 Answers   Accenture,


What is the function of java?

1 Answers  


Categories