Converting datatype in Java
I came across a Java tips and would like to share with you. The tips is regarding "Converting datatype in Java". here is the few detail about the tips:
There are times while coding when we need to convert an entity of one datatype to another. For instance, in the following example, assigning an integer value to a string would throw exception, so what we would do instead is convert the integer into a string value.
integer to String :
int i = 42;
String str = Integer.toString(i);
String str = "" + i;
Fore detail about the tips, please visit: http://www.mindfiresolutions.com/Con...in-Java-46.php
Hope you find it useful and of assistance.