Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Beginning Java
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Jeanne Boyarsky
Ron McLeod
Paul Clapham
Liutauras Vilda
Sheriffs:
paul wheaton
Rob Spoor
Devaka Cooray
Saloon Keepers:
Stephan van Hulst
Tim Holloway
Carey Brown
Frits Walraven
Tim Moores
Bartenders:
Mikalai Zaikin
Forum:
Beginning Java
Float to string n String to Float ex
Sham Jowsaki
Ranch Hand
Posts: 146
posted 20 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Hi All,
Can you pls give me an example of data conversion of
float to
string
string to float
Thanks
Jowsaki
Ernest Friedman-Hill
author and iconoclast
Posts: 24207
46
I like...
posted 20 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
float f = 3.0f;
String s = String.valueOf(f);
// This can throw NumberFormatException
f = Float.parseFloat(s);
[Jess in Action]
[AskingGoodQuestions]
Ransika deSilva
Ranch Hand
Posts: 524
posted 20 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
You can use
Strnig x = Float.toString(float a) also to convert a float to a string..
SCJP 1.4, SCMAD 1.0<br />SCWCD, SCBCD (in progress)
Don't get me started about those stupid
light bulbs
.
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
wrappers
WA #2 ..... word association
java.lang
float
Tech Word Game
More...