The Artima Developer Community
Sponsored Link

Java Answers Forum
Numbers conversion

1 reply on 1 page. Most recent reply: Oct 14, 2002 3:42 AM by siddhartha

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 1 reply on 1 page
Debbie

Posts: 1
Nickname: deb301
Registered: Oct, 2002

Numbers conversion Posted: Oct 12, 2002 6:48 PM
Reply to this message Reply
Advertisement
I am new to java and I need a program that will convert a decimal number to a written out number. ie 5000000.50 to 50 million and 50/100. I am a student and I am really lost at how to attemp this. If anyone can help I would appreciate it.


siddhartha

Posts: 15
Nickname: saddysan
Registered: Jul, 2002

Re: Numbers conversion Posted: Oct 14, 2002 3:42 AM
Reply to this message Reply
put your number in a String, then by using StringTokenizer seperate the number into two parts, one before decimal and the other after decimal. Then count the number of digits in the String say if there are 7 digits then the digit is in millions and act accordingly.

what i have mentioned is just a hint i guess tell me if u still face problem


saddysan

Flat View: This topic has 1 reply on 1 page
Topic: JDBC Oracle8i connectivity problem Previous Topic   Next Topic Topic: Validation NT username and password

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use