I am using the following approach to convert any primitive data type to string
Example
int i = 5;//
String convertToString = ""+i;// convert any primitive data type to string
To convert int data type to string i can use Integer.toString() but what is the better way to convert any type of primitive data (not only int) types to string
.toString()method?toString()can't be applied to primitive typeint