In Java, to convert a String into an integer you can use either
Integer.valueOf(String)
or
Integer.parseInt(String).
But what is the difference between them? Well
Integer.valueOf(String) gives as result an Integer object.
Integer.parseInt(String) gives the primitive Java type int
No comments:
Post a Comment
Your comment will be visible after approval.