How can you read content from file in java?



How can you read content from file in java?..

Answer / Md. Ehsanul Haque

"To read content from a file in Java, use the FileReader and BufferedReader classes:
1. Create a FileReader object to read from the file.
2. Wrap the FileReader with a BufferedReader to improve performance.
3. Use the readLine() method to read each line of the file into a String."

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Core Java Interview Questions

What is the applet security manager, and what does it provide?

1 Answers  


Which methods cannot be overridden in java?

1 Answers  


Why do we use variables?

1 Answers  


while creating thread why we extend thread class

2 Answers  


can two class in a code be public??if yes then how??

2 Answers  


How can we make a class virtual?

1 Answers   Fidelity,


Different types of Layouts?

11 Answers  


Explain Method Overloading in Java.

1 Answers  


What is the gregoriancalendar class in java programming?

1 Answers  


Can you access the private method from outside the class?

1 Answers  


What is the difference between parameters and arguments ?

2 Answers  


What is scanner in java?

1 Answers  


Categories