Run ❯
Get your
own Java
server
×
Change Orientation
Change Theme, Dark/Light
Go to Spaces
public class Main { public static void main(String[] args) { System.out.println(Math.signum(12)); System.out.println(Math.signum(0.5)); System.out.println(Math.signum(0)); System.out.println(Math.signum(-0.25)); System.out.println(Math.signum(-6)); } }
1.0
1.0
0.0
-1.0
-1.0