Search Interview Questions
| More than 3000 questions in repository.|
There are more than 900 unanswered questions.
Click here and help us by providing the answer.
Have a video suggestion.
Click Correct / Improve and please let us know.
|Java - Interview Questions and Answers|
|Ans. Scanner class introduced in Java 1.5 for reading Data Stream from the imput device. Previously we used to write code to read a input using DataInputStream. After reading the stream , we can convert into respective data type using in.next() as String ,in.nextInt() as integer, in.nextDouble() as Double etc|
|Help us improve. Please let us know the company, where you were asked this question :|
|Like Discuss Correct / Improve  java   java5   scanner   file io   file input   data input stream  file handling basic|
|What is a stream and what are the types of Streams and classes of the Streams?|
|Name few File IO related classes and interfaces ?|
|Tell something about BufferedWriter ? What are flush() and close() used for ?|
|What is the difference between the Reader/Writer class hierarchy and the InputStream/OutputStream class hierarchy?|
|Which is the abstract parent class of FileWriter ?|
|Which class is used to read streams of characters from a file?|
|Which class is used to read streams of raw bytes from a file?|
|Which is the Parent class of FileInputStream ?|
|Difference between Scanner and BufferedReader ? Which one is faster and Why ?|