課程
/后端開(kāi)發(fā)
/Java
/Java入門(mén)第三季
Scanner類(lèi)中的next()方法是如何使用的?next()返回迭代的下一個(gè)值,那第一個(gè)值怎么輸出的?
2017-03-22
源自:Java入門(mén)第三季 4-11
正在回答
Scanner console=new Scanner(System.in); ?//聲明輸入變量console
String stuID=console.next();// 把輸出內(nèi)容console.next()賦值給stuID;
求助實(shí)現(xiàn)原理,而不是代碼怎么寫(xiě)
Scanner console=new Scanner(System.in);
String stuID=console.next();
慕粉1556379847 提問(wèn)者
舉報(bào)
Java中你必須懂得常用技能,不容錯(cuò)過(guò)的精彩,快來(lái)加入吧
1 回答Scanner中next()與nextLine()的區(qū)別
2 回答string類(lèi)的常用方法如何書(shū)寫(xiě)
1 回答如何在main方法中調(diào)用try中的變量?
4 回答String類(lèi)中的常用方法
3 回答包裝類(lèi)的方法是使用類(lèi)名調(diào)用還是用包裝類(lèi)的對(duì)象調(diào)用?
Copyright ? 2025 imooc.com All Rights Reserved | 京ICP備12003892號(hào)-11 京公網(wǎng)安備11010802030151號(hào)
購(gòu)課補(bǔ)貼聯(lián)系客服咨詢(xún)優(yōu)惠詳情
慕課網(wǎng)APP您的移動(dòng)學(xué)習(xí)伙伴
掃描二維碼關(guān)注慕課網(wǎng)微信公眾號(hào)
2017-04-04
Scanner console=new Scanner(System.in); ?//聲明輸入變量console
String stuID=console.next();// 把輸出內(nèi)容console.next()賦值給stuID;
2017-03-24
求助實(shí)現(xiàn)原理,而不是代碼怎么寫(xiě)
2017-03-22
Scanner console=new Scanner(System.in);
String stuID=console.next();