Javatpoint Logo
Javatpoint Logo

Java Math.copySign() method

The java.lang.Math.copySign () is used to return the first argument with the sign of the second argument.

Syntax

Parameter

Return

Example 1

Test it Now

Output:

-740.4

Example 2

Test it Now

Output:

580.73

Example 3

Test it Now

Output:

-26.9

Next TopicJava Math




Please Share

facebook twitter google plus pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA