What is the difference between taking input from Scanner and BufferedReader ?
Here is a BufferedReader example...
BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); System.out.println("Enter characters, 'q' to quit."); // read characters do { c = (char) br.read(); System.out.println(c); } while(c != 'q'); And here is a Scanner example...
Scanner scan = new Scanner(System.in); char mrArray = new char[10]; // read characters for (int i = 0; i < myArray.length; i++) { String temp = myScanner.next(); myArray[i] = temp.charAt(0); } Is there any difference between the two cases? Are any of these classes likely to be changed in the future? Should I use BufferedStream in preference to Scanner?