1
I need an exact value but my code always rounds down:
float percentageUsed = 6050492416 / 8258998272;
System.out.println(String.format("Porcentagem: %.2f", percentageUsed));
In case I had to return 0.73, but it always returns me 0.0.
How to get the exact result?
This answers your question? Division always resulting in zero
– fernandosavio
This answers your question? Simple equation of division in java
– Rafael Tavares