publicclass TypeChange {
//change the string type to the int typepublicstaticintstringToInt(String intstr)
{
Integer integer;
integer = Integer.valueOf(intstr);
return integer.intValue();
}
//change int type to the string typepublicstatic String intToString(intvalue)
{
Integer integer = new Integer(value);
return integer.toString();
}
//change the string type to the float typepublicstaticfloatstringToFloat(String floatstr)
{
Float floatee;
floatee = Float.valueOf(floatstr);
return floatee.floatValue();
}
//change the float type to the string typepublicstatic String floatToString(floatvalue)
{
Float floatee = new Float(value);
return floatee.toString();
}
//change the double type to the string typepublicstaticdoublestringToDouble(String doublestr)
{
Double doubleee;
doubleee = Double.valueOf(doublestr);
return doubleee.doubleValue();
}
//change the double type to the string typepublicstatic String doubleToString(doublevalue)
{
Double doubleee = new Double(value);
return doubleee.toString();
}
}