Computer Science, asked by tsumisaron, 1 year ago

write down the syntax for the following functions in Java programming : to find the absolute value of a number ( for class 8 )

Answers

Answered by pearltechid
9

java.lang.Maths.abs(int a) returns the absolute value of an integer in Java programing.If the argument is negative the negation of the arguments is returned. If it is not negative then argument is returned.

Answered by Anonymous
4

Syntax :-

<Return Data type><variable> = Function name ( number );

e.g:

int n = Math.abs(-8); \\ it returns an integer value to the variable n as 8.

Similar questions