StringBuilder类型与String类型相互转换
1 StringBuilder a = new StringBuilder("This is testDemo");
2 String b = "Hello"+a; //将StringBuilder类型转换成String类型
3 StringBuilder a = new StringBuilder(a); //将String类型转换为StringBuilder类型
1 StringBuilder a = new StringBuilder("This is testDemo");
2 String b = "Hello"+a; //将StringBuilder类型转换成String类型
3 StringBuilder a = new StringBuilder(a); //将String类型转换为StringBuilder类型