Java——Scanner讀取問題

nextInt(nextFloat nextByte) next nextLine 1.讀取方式上來講 大家都以回車符作爲結束符號 除了nextLine以外其餘的方法都不讀取回車符 2.讀取的返回結果來講 nextInt–>int nextFloat–float next–String nextLine–>String next方法看到回車或空格都認爲結束 nextLine只認爲回車符結束 輸入a
相關文章
相關標籤/搜索