Can someone explain to me how to convert a number to a string. For example like this number 99812.50 to a string in words (Ninety nine thousand eight hundred twelve dollars and fifty cents,

Recommended Answers

All 2 Replies

Separate the number to the units you want to represent with division, mod, etc. Then use an array or map to translate the digits to words.

Can someone explain to me how to convert a number to a string. For example like this number 99812.50 to a string in words (Ninety nine thousand eight hundred twelve dollars and fifty cents,

did you mean explain the logic or the Java coding?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.