Java

I dont know how to tell the user to stop when the input from the user is a value of a -20 or a negative number.

i know how to use an if statement but the problem is i cant tell it to stop or show message if the user inputs a negative number

help in java programming