I need to learn how to convert a long
value into a currency formatted string in a toString()
method with the following scenarios:
- If given long value = 9287, needs to be displayed as $92.87
- If given long value = -9287, needs to be displayed as $-92.87
- If given long value = 100000000, needs to be displayed as $1,000,000.00
- If given long value = 49, needs to be displayed as $0.49
Any help from string gurus is appreciated.