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





Youtube For Videos Join Our Youtube Channel: Join Now

Feedback


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA