Java Integer signum() MethodLast Updated : 17 Mar 2025 The signum() method of Java Integer class returns the signum function of the specified int value in the method argument. The signum function can be computed as:
Syntax:Following is the declaration of signum() method: Parameter:
Returns:The signum() method returns the signum function of the specified int value in the method argument. Exceptions:NA Compatibility Version:Java 1.5 and above Example 1Output: Result: 1 Result: -1 Result: 0 Example 2Output: Enter Positive Value: 4565 Result: 1 Enter Negative Value: -432 Result: -1 Enter Zero Value: 000 Result: 0 Example 3Output: Output: NaN Output: 0.0 Output: 0.0 Next TopicJava-integer-sum-method |
We request you to subscribe our newsletter for upcoming updates.

We deliver comprehensive tutorials, interview question-answers, MCQs, study materials on leading programming languages and web technologies like Data Science, MEAN/MERN full stack development, Python, Java, C++, C, HTML, React, Angular, PHP and much more to support your learning and career growth.
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India