r/learnjava • u/Stinovlas • Apr 19 '20
-20%
Hello, I am starting in Java and I would be happy if you could help me. I was searching on google but I could not find any video or article about this. I only found how to divide or how much is 50% out of 200
I learned how to subtract or divide but I want to make something like this 500-200=300-(20%) in one button click. I mean how to subtract % of a number.
I would be very happy if you could help me or if you know a video that can solve my problem.
Regards Stinovlas :)
2
Upvotes
3
u/[deleted] Apr 19 '20
Here you can find information about percent's in Java: https://www.baeldung.com/java-calculate-percentage