The Sample program given below will test your understanding about the Stream classes in Java.
The Sample program given below will test your understanding about the Stream classes in Java.Re-arrange the code for reading a text file.
FileInputStream fstream = (1) Place code here(X) new FileInputStream("textfile.txt");
(Y) new BufferedReader(new InputStreamReader(in));
(Z)
DataInputStream in
Options:
(A) 1-X, 2-Y, 3-Z
(B) 1-X, 2-Z , 3-Y
(C) 1-Z, 2-X, 3-Y
(B)