Nice and simple. Add this snippet in whatever you’re outputting to:
String.format("%.0f", percentageValue)
More Related Contents:
- Solving a “communications link failure” with JDBC and MySQL [duplicate]
- What’s causing my java.net.SocketException: Connection reset? [duplicate]
- Get driving directions using Google Maps API v2
- How to specify the default error page in web.xml?
- How to convert a Java 8 Stream to an Array?
- Java abstract interface
- Getting Spring Application Context
- How to build sources JAR with Gradle?
- Static Vs. Dynamic Binding in Java
- JavaBean wrapping with JavaFX Properties
- How to parse a JSON string to an array using Jackson
- Why cannot cast Integer to String in java?
- Configure active profile in SpringBoot via Maven
- Tomcat vs Weblogic JNDI Lookup
- Parsing time strings like “1h 30min”
- Creating BSON object from JSON string
- How to get the value of a bit at a certain position from a byte?
- Java ArrayIndexOutOfBounds Exception
- How to replace table name with parameter value while using Spring Data JPA nativeQuery
- Inline images in email using JavaMail
- LOG4J: Modify logged message using custom appender
- Why does Java permit escaped unicode characters in the source code?
- How to extend a final class in Java
- Setting socket read timeout with javax.xml.soap.SOAPConnection
- Why “no projects found to import”?
- What is binary compatibility in Java?
- Can SHA-1 algorithm be computed on a stream? With low memory footprint?
- How to read an XML file with Java?
- Jboss Seam: Enabling Debug page on WebLogic 10.3.2 (11g)
- Best way to get maximum Date value in java?