Now you can Subscribe using RSS

Submit your Email

2015/03/25

取得使用者輸入

asd
Scanner: 
在文字模式下要輸入資料至程式中時,您可以使用標準輸入串流物件 System.in,然而實際上很少直接使用它,
因為System.in 物件所提供的 read() 方法,是從輸入串流取得一個位元組的資料,並傳回該位元組的整數值,
但通常您要取得的使用者輸入會是一個字串,或是一組數字,所以 System.in 物件的 read() 方法一次只讀入一個位元組資料的方式並不適用。

Coprights @ 2016, Blogger Templates Designed By Templateism | Templatelib