The moose likes Performance and the fly likes convert Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Performance
Reply Bookmark "convert" Watch "convert" New topic
Author

convert

Jackie Wang
Ranch Hand

Joined: Apr 18, 2002
Posts: 315
there are a lot of ways to convert a string to integer and interger to string.
what's the shortest code and what's the most efficient way to do that?
thanks!
Barry Gaunt
Ranch Hand

Joined: Aug 03, 2002
Posts: 7729
Take a look at the static methods of the Integer class, especially parseInt() and toString().


Ask a Meaningful Question and HowToAskQuestionsOnJavaRanch
Getting someone to think and try something out is much more useful than just telling them the answer.
 
IntelliJ Java IDE
 
subject: convert
 
Threads others viewed
amount of digits entered(without a tokenizer)....
how to subtract two strings
how to convert Byte to the String
Quick Q: converting String to java.sql.Date
perl help
developer file tools