看板 java 關於我們 聯絡資訊
像下面這種最簡單的程式碼 Console畫面都的先自行移動游標位置 才能正確輸入 請問有辦法讓游標出現在那個位置嗎 thank import java.util.Scanner; public class Test { public static void main(String[] argv) { int = n; System.out.println("請輸入整數"); Scanner sc = new Scanner(System.in); // 由 System.in 取得輸入 n = sc.nextInt(); // 由輸入端取得一個整數, System.out.println(n); } } -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 118.163.106.192 ※ 文章網址: http://www.ptt.cc/bbs/java/M.1395751654.A.056.html
PsMonkey:這好像牽扯到 ANSI 的控制碼,我記得版上有過,但是..... 03/26 05:47
所以是有難度 沒事不用去處理這個? ※ 編輯: dharma 來自: 118.163.106.192 (03/26 10:22)
Killercat:jline看看能不能滿足你的需求 03/26 18:21