There are way too many questions and answers about this basic functionality, I cannot see the wood for the trees.
In Java there is only one simple answer (jav
jav
http://jquerypriceformat.com/#examples
https://github.com/flaviosilveira/Jquery-Price-Format
html input runing for live chance.
$('.priceformat').each(function( index ) { $(this).priceFormat({ prefix: '', thousandsSeparator: '' }); });
//5000.00
//5.000,00
//5,000.00