The Artima Developer Community
Sponsored Link

Java Answers Forum
casting...

1 reply on 1 page. Most recent reply: Sep 12, 2005 2:49 AM by Kondwani Mkandawire

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
rey

Posts: 10
Nickname: zerocoal
Registered: Sep, 2005

casting... Posted: Sep 12, 2005 1:09 AM
Reply to this message Reply
Advertisement
hi, still remember me? im the who post to the topic on how to convert numbers to words..i've already done making it. except for 1 problem. My problem is..My program will not read the remaining amount after the decimal places.
Example: 23.30; the program should read it twenty three and 30/100..
I would like to ask how to use casting..?
I hope somebody can help me..
May God bless you all..THANKS


Kondwani Mkandawire

Posts: 530
Nickname: spike
Registered: Aug, 2004

Re: casting... Posted: Sep 12, 2005 2:49 AM
Reply to this message Reply
I don't know how you are implementing it, but
if you're calling it as an int, then it obviously
won't be reading those.

to cast simply put (primitive-type) infront of whatever you
want to cast. E.g. you want to cast this to a double:

float f = 2.435;

You will do something like:

double temp = (double)f;

I doubt that will help you much, but it answers the
question you asked.

Spike

Flat View: This topic has 1 reply on 1 page
Topic: random triangles and colors Previous Topic   Next Topic Topic: convert numbers to words

Sponsored Links



Google
  Web Artima.com   

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