In this example, We are going to convert number to words.
The following program takes the two static array of Strings . Here, we are going to make a method in which a parameter of integer type is passed. After that this program is going to create an another method of name convert() . In the main class create an object, and pass the value in object (num) . It displays the string representing the number.
Here is the code of this program:
Output of this program.
words is :=zero
words is :=One
words is :=Nine
words is :=One Hundrad
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.