Coggle requires JavaScript to display documents.
public Constructor(variable) { this.variable = variable; }
Integer number = 100; //編譯器結果 Integer localInteger = Integer.valueOf(100);
//編譯成功,執行失敗,因為nullPointerExcpetion Integer i = null; int j = i; //編譯結果 Object localObject = null; int i = localObject.intValue();
Integer i1 = 100; Integer i2 = 100; i1 == i2的結果為true Integer i1 = 200; Integer i2 = 200; i1 == i2為false
str = "Ja" + "va"; str2 = "Java"; str == str2 -> true str = "Ja", str2 = str + "va"; str3 = "Java"; str2 == str3 -> false