關(guān)于添加新對(duì)象的問(wèn)題
為什么這樣不對(duì)studentList.add(new student("k","Lucy"));,這樣是對(duì)的studentList.add(new student(k+"","Lucy"));。那個(gè)k是Integer類(lèi)型的
為什么這樣不對(duì)studentList.add(new student("k","Lucy"));,這樣是對(duì)的studentList.add(new student(k+"","Lucy"));。那個(gè)k是Integer類(lèi)型的
2016-08-11
舉報(bào)
2016-08-11
k+“”這樣可以吧integer類(lèi)型轉(zhuǎn)化為String類(lèi)型
2016-08-11
int類(lèi)型的不用引號(hào),string類(lèi)型用引號(hào)