Write a program in java to accept a number entered by the user. Check whether it is a positive or a negative number.If it is positive check whether it is divisible by 5 or not.
Java Integer class provides an inbuilt function signum() to check if a number is positive or negative. It is a static method that accepts a parameter of integer type.
Answers & Comments
Answer:
Java Integer class provides an inbuilt function signum() to check if a number is positive or negative. It is a static method that accepts a parameter of integer type.
...
Approach 2: Using Integer.signum() Method
It returns 0, if the argument is 0.
It returns 1, if the argument>0.
It returns -1, if the argument<0
Explanation:
I hope its helpful Please mark me as brainliest