Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

how to round up in java

int x = 3.14;

Math.round(x);
//Rounds to nearest int
Math.ceil(x);
//Rounds up to int
Math.floor(x);
//Rounds down to int
 
PREVIOUS NEXT
Tagged: #java
ADD COMMENT
Topic
Name
5+1 =