Hello Everyone,
I have seen many programmers write their own functions to convert String into integer, float or double, when they code in Java. I want to ask just one thing that is it faster than using built in functions provided by Java? Please bear with the question if you find it very childish or basic.
class Convert{
public static void main(String[] args)
{
String s=“123”;
double d;
float f;
int i;
i=Integer.parseInt(s);
d=Double.parseDouble(s);
f=Float.parseFloat(s);
System.out.println(i +" " +d +" "+f)
}
}|
even i have the same doubt!