Core Java - Interview Questions and Answers for 'Flush' | Search Interview Question - javasearch.buggybread.com
Javasearch.buggybread.com

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.
Label / Company      Label / Company / Text

   



Core Java - Interview Questions and Answers for 'Flush' - 2 question(s) found - Order By Rating

 Q1. How and when the Buffer is cleared when using Buffered Writer Classes ?Core Java
Ans. Buffer is cleared in 2 circumstances, i.e 1. naturally when the buffer is filled and 2. explicitly when the method flush is called ( for flushing the residual )

Ideally we just need to call flush once at the end of file writing so that the residual content should be dumped to file.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     BufferedWriter  Writer  PrintWriter  File io  flush  file handling


Related Questions

  Tell something about BufferedWriter ? What are flush() and close() used for ?
 Difference between save and flush in Hibernate ?
 Have you ever faced any problem because of PrintWriter buffer and autoflush mechanism ? How did you got rid of it ?
 Can we disable auto flushing for PrintWriter ?


 Q2. Tell something about BufferedWriter ? What are flush() and close() used for ?
Ans. BufferedWriter is temporary source for data storage.BufferedWriter is used to write character data to the file.Flush() is method available in B.W which ensures that all data items are written to file including last character.Close() is used to closes the character output stream.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     java   java io   input output   file handling   file io   output stream   bufferedwriter   flush   close


Related Questions

 How and when the Buffer is cleared when using Buffered Writer Classes ?
 Difference between save and flush in Hibernate ?
 Have you ever faced any problem because of PrintWriter buffer and autoflush mechanism ? How did you got rid of it ?
 Can we disable auto flushing for PrintWriter ?



Help us and Others Improve. Please let us know the questions asked in any of your previous interview.

Any input from you will be highly appreciated and It will unlock the application for 10 more requests.

Company Name:
Questions Asked: