I used the following code to check whether a input number is negative or not.
But it's not working.
Can anyone please help me?

import javax.swing.JFrame;
import...