1.Java中的加法的運算優先級是從左往右的
2.字符串""隔壁跟的+號意思是字符串的連接 就不是加法了
3.'字符' 后面的+號意思是'字符'的ascall碼值和后面的值相加
class DataTypeDemo9 {
public static void main(String[] args){
System.out.println("hellow"+'a'+'1'); // 輸出helloa1
System.out.println('a'+1+"hello"); // 輸出為98hellow ('a'='A'+'0' ,97 = 65 + 32 )(97+1 再連接hellow 字符串)
System.out.println("5+5="+5+5); // 輸出為字符串5+5=55(字符串的連接)
System.out.println(5+5+"=5+5"); // 輸出為10=5+5 (先算出5+5的運算 得出10再連接字符串"5+5")
}
}