Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How do I change a string into a float?

 
Juan Sifuentes
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a string input and I know how to change it into a interget using

(interger variable) = Integer.parseInt(String variable);

How can I change a String into a float?
 
Balu Sadhasivam
Ranch Hand
Posts: 874
Android Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Juan,

The first place to check is Java Float API . Here it is
 
Bill Cruise
Ranch Hand
Posts: 148
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In a pretty similar fashion.



javadoc
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic