Check whether the input number(entered by the user) is positive or negative PROGRAM: import java . util . Scanner ; public class Demo { pub…