A common task in any programming language, especially for students, is to convert a double or a float into a properly round and formatted decimal format appropriate for use as currency. There are two rather discrete steps in this process. The first step is to round the number appropriately. When working with currency people tend …
Continue reading “Java Snippet: Converting a Double to Currency”