a+=b與a=a+b的區(qū)別
a=a+b會把結(jié)果結(jié)果強(qiáng)制轉(zhuǎn)換何曾a和b的最高類型
a+=b結(jié)果是a類型
一般推薦使用a+=b
String 和 byte數(shù)組的轉(zhuǎn)化
String 內(nèi)不是char數(shù)組 兩個字節(jié)储笑,byte是一個字節(jié)
byte[] byteArray = str.getBytes();
String str = new String(byteArray);