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.rint(0.5)); System.out.println(Math.rint(1.5)); System.out.println(Math.rint(5)); System.out.println(Math.rint(5.1)); System.out.println(Math.rint(-5.1)); System.out.println(Math.rint(-5.9)); } }
0.0
2.0
5.0
5.0
-5.0
-6.0