####1、int、float、double 转string

int i;
(1)String s = String.valueOf(i);
(2) String s = Integer.toString(i); 
(3) String s = "" + i;

####2)String转int、float、double

String str = "123";
(1) int i = Integer.parseInt(str);  
(2) int i = Integer.valueOf(str).intValue();

####3)float 、double 转 int

float a = 12.123;
int b = (int) a;

####4)float 、double 保留小数点后几位

float   mfloat =   12.12345;   
DecimalFormat   fnum  =   new  DecimalFormat("##0.00");    
String   strfloat = fnum.format(mfloat);
//或者
//String  strfloat = new DecimalFormat("0.00").format(mfloat);