java printf $ sign and 2 decimal places with text message code example Example: 2 decimal places print format JAVA printf(%.2f);