課程
/后端開發
/Java
/Java入門第三季
需要手動把光標調到正確輸入的位置程序才能運行出來..是不是我的程序有問題
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作為他的結束符
我也出現了這個問題 ? ?糾結了好久。。。
我也出現了
假如你用的是eclipse,或者mye,不是你程序的問題,是eclipse本身的bug。
出現這種問題后,只能重新運行你的程序了,沒辦法繼續獲取輸入了
舉報
Java中你必須懂得常用技能,不容錯過的精彩,快來加入吧
2 回答輸出的情況
1 回答大佬們,這是什么情況
1 回答誰知道這是什么情況呀???
4 回答這個是什么情況啊?
4 回答這是什么情況
Copyright ? 2025 imooc.com All Rights Reserved | 京ICP備12003892號-11 京公網安備11010802030151號
購課補貼聯系客服咨詢優惠詳情
慕課網APP您的移動學習伙伴
掃描二維碼關注慕課網微信公眾號
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作為他的結束符
2017-09-14
我也出現了這個問題 ? ?糾結了好久。。。
2017-08-05
我也出現了
2017-07-15
假如你用的是eclipse,或者mye,不是你程序的問題,是eclipse本身的bug。
出現這種問題后,只能重新運行你的程序了,沒辦法繼續獲取輸入了