課程
/后端開發(fā)
/Java
/Java入門第三季
需要手動把光標調(diào)到正確輸入的位置程序才能運行出來..是不是我的程序有問題
2017-07-11
源自:Java入門第三季 1-9
正在回答
when you type into a line of words or codes,please end with "\n";
for example:
System.out.println("please enter a number:");
Scanner s =?new?Scanner(System.in);?
String line = s.nextLine();?
because nextLine()自動讀取了被next()去掉的Enter作為他的結(jié)束符
我也出現(xiàn)了這個問題 ? ?糾結(jié)了好久。。。
我也出現(xiàn)了
假如你用的是eclipse,或者mye,不是你程序的問題,是eclipse本身的bug。
出現(xiàn)這種問題后,只能重新運行你的程序了,沒辦法繼續(xù)獲取輸入了
舉報
Java中你必須懂得常用技能,不容錯過的精彩,快來加入吧
2 回答輸出的情況
1 回答誰知道這是什么情況呀???
1 回答大佬們,這是什么情況
4 回答這個是什么情況???
4 回答這是什么情況
Copyright ? 2025 imooc.com All Rights Reserved | 京ICP備12003892號-11 京公網(wǎng)安備11010802030151號
購課補貼聯(lián)系客服咨詢優(yōu)惠詳情
慕課網(wǎng)APP您的移動學習伙伴
掃描二維碼關注慕課網(wǎng)微信公眾號
2017-07-11
when you type into a line of words or codes,please end with "\n";
for example:
System.out.println("please enter a number:");
Scanner s =?new?Scanner(System.in);?
String line = s.nextLine();?
because nextLine()自動讀取了被next()去掉的Enter作為他的結(jié)束符
2017-09-14
我也出現(xiàn)了這個問題 ? ?糾結(jié)了好久。。。
2017-08-05
我也出現(xiàn)了
2017-07-15
假如你用的是eclipse,或者mye,不是你程序的問題,是eclipse本身的bug。
出現(xiàn)這種問題后,只能重新運行你的程序了,沒辦法繼續(xù)獲取輸入了