JAVA#輸入輸出練習 札記
阿新 • • 發佈:2019-01-11
public String InOutpu(){ InputStreamReader isr=new InputStreamReader(System.in); BufferedReader br=new BufferedReader(isr); String str=null; try{ str=br.readLine(); }catch (IOException e){ e.printStackTrace(); } return str; } public static void main(String[] args) { System.out.println("Please input an array:"); TESTRandomAccess tra=new TESTRandomAccess(); String s=tra.InOutpu(); System.out.println(s); }
Please input an array:
fsadfasf
fsadfasf