package com.ata.wx;
public class EightChange {
int i;
String str;
String strFloat;
float flToString;
EightChange() {
super();
init();
}
void init() {
i = 100;
str = "65";
strFloat = "97";
flToString = 89.34f;
}
public static void main(String[] Args) {
EightChange cg = new EightChange();
EightChange.stringToInt(cg.str);
EightChange.intToString(cg.i);
EightChange.stringToFloat(cg.strFloat);
EightChange.FloatToString(cg.flToString);
}
private static int stringToInt(String str) { // /Stringתint
System.out
.println("stringToInt is :" + Integer.valueOf(str).intValue());
return Integer.valueOf(str).intValue();
}
private static String intToString(int value) { // //intתString
Integer integer = new Integer(value);
System.out.println("intToString is :" + integer.toString());
return integer.toString();
}
private static float stringToFloat(String strFloat) {// /Stringתfloat
System.out.println("stringToFloat is "
+ Float.valueOf(strFloat).floatValue());
return Float.valueOf(strFloat).floatValue();
}
private static String FloatToString(float floatStr) {// /Float
// to String
Float floatee = new Float(floatStr);
System.out.println("FloatToString is :" + floatee.toString());
return floatee.toString();
}
private static String doubleToString(double doublestr) {// ///double
// to String
Double doublee = new Double(doublestr);
System.out.println("soubleToString is :" + Double.toString(doublestr));
return doublee.toString();
}
private static double stringToDouble(String stringDou) {
System.out.println("stringToDouble is :"
+ Double.valueOf(stringDou).doubleValue());
//return Double.valueOf(stringDou).doubleValue();
return Double.parseDouble(stringDou);
}
}