課程
/后端開發(fā)
/Java
/Java入門第二季 升級版
int p = initail.cars[a-1].price; ? a-1是什么意思
2018-05-28
源自:Java入門第二季 升級版 12-1
正在回答
大概是因為車的序號是從1開始計數(shù)的,而數(shù)組中的索引是從0開始計數(shù)了,為了對應起來,所以要減去1。
RSF 提問者
舉報
課程升級!以終為始告別枯燥,在開發(fā)和重構中體會Java面向?qū)ο缶幊痰膴W妙
2 回答找錯。報錯顯示cpu cannot be resolved to a variable、price cannot be resolved to a variable、
2 回答The constructor Student(int, String, int, int, int, String) is undefined
1 回答int newScore = mi.getScore();
2 回答public static int num=10;&static public int num=10;
1 回答A a=new B();
Copyright ? 2025 imooc.com All Rights Reserved | 京ICP備12003892號-11 京公網(wǎng)安備11010802030151號
購課補貼聯(lián)系客服咨詢優(yōu)惠詳情
慕課網(wǎng)APP您的移動學習伙伴
掃描二維碼關注慕課網(wǎng)微信公眾號
2018-05-28
大概是因為車的序號是從1開始計數(shù)的,而數(shù)組中的索引是從0開始計數(shù)了,為了對應起來,所以要減去1。