How do you do absolute value in java?



How do you do absolute value in java?..

Answer / Girja Shankar

You can obtain an absolute value in Java by using the Math.abs() function, for example: `double absValue = Math.abs(-10);`

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Core Java Interview Questions

Does java have a compiler?

1 Answers  


The class "Class" is belongs to which package?? a) java.lang b)java.lang.reflect c)java.util d)None

4 Answers  


How do you implement tree mirroring in java?

1 Answers   EXL, HCL,


How do you define a variable?

1 Answers  


Differentiate between static and non-static methods in java.

0 Answers  


Define nashorn in java8.

1 Answers  


What is basic concept of static in java ?

1 Answers   iGate,


Why convert an applet to an application?

1 Answers  


Can you extend main method in java?

1 Answers  


What is a class in java?

1 Answers  


What do you mean by static variable?

1 Answers   TCS,


what is the difference between static class and singleton class? can we create static class?

2 Answers   L&T, Octazen, Vamsi Labs,


Categories