+ 1
How do you print a two decimal output in java?
21st Oct 2021, 8:50 AM
Leoror

2 Answers
+ 5
System.out.printf("%.2f", val);
21st Oct 2021, 9:01 AM
Coding Cat

+ 1
Coding Cat Thank you!
21st Oct 2021, 9:53 AM
Leoror

Often have questions like this?
Learn more efficiently, for free:
Hot today
Ошибка в приложении Sololearn
1 Votes
NEO V2.0
1 Votes
Sololearn course
1 Votes
Best language?
0 Votes