This week's book giveaway is in the Performance forum. We're giving away four copies of The Java Performance Companion and have Charlie Hunt, Monica Beckwith, Poonam Parhar, & Bengt Rutisson on-line! See this thread for details.
could anyone let me know how to check whether the string is an integer? Thanks,
posted 16 years ago
Integer.parseInt(String) If the String doesn't represent an integer, the method will throw a NumberFormatException. Otherwise, it returns the value of the int. Similar methods exist in the other numeric wrapper classes as well - Float, Double, Long, etc.