/**
* demo how to convert int to string and back. similar
* stuff can be done with the float, double, etc. classes
* in java.lang
***/
public class stringtoint
{
public static void main(string args[]) throws exception
{
// from string to int
string sa="123";
int ia=integer.parseint(sa);
// from int to string
int ib=23;
string sb = string.valueof(ib);
}
}
闽公网安备 35060202000074号