Number To Words Java Program

6/6/2018by admin

Description Number to word converter java program converts numeric value into words, currently the program will convert up to thousands. The same logic is applied for. How to convert number to words in java. All you've to do is - just copy the whole class from Java program to convert numbers to words and paste it in your project.

I have this homework assignment for this class I'm retaking, the problem I'm running into is that I'm over-thinking the solution. I have to create a program that converts a four digit number to words.

Number To Words Java Program

(Example: 1134 becomes 'One One Three Four') I have a basic code, but it's bulky and ugly. I'm also only allowed to use basic if and switch statements, we have to use a switch statement as well. Portable Prezi. Am I over thinking this? I can't figure out how to make this code shorter and I only want to use one switch statement without a while loop. Is it even possible or is this as short as it gets.

Here's my code.