Welcome to the forum :)

Java has two standard methods for formatting output in the manor you want.

printf() and format()

You can set how far to the right of the decimal you want the figure...