0

How to convert Integer to its corresponding word

I wanted to convert 19:28 as Nineteen and twenty Eight. How do I do it.

22nd May 2022, 12:20 AM
Gul Mohammed
Gul Mohammed - avatar
2 Answers
+ 2
This place has a code playground. Have you tried to look there? Search for "number words", select Java as language with "most popular" filter. Happy studies 🙂🍀
22nd May 2022, 2:41 AM
Ani Jona 🕊
Ani Jona 🕊 - avatar
0
Hi, you can look at the split() method applicable on strings which can help you. Then use a Map<int, String> to convert each number into words or use ICU4J. https://stackoverflow.com/questions/3911966/how-to-convert-number-to-words-in-java
22nd May 2022, 7:23 AM
Roland
Roland - avatar