write java function to read a file
Answers
Answered by
4
Explanation:
Different ways of Reading a text file in Java
Using BufferedReader: This method reads text from a character-input stream. ...
Using FileReader class: Convenience class for reading character files. ...
Using Scanner class: A simple text scanner which can parse primitive types and strings using regular expressions. ...
Using Scanner class but without using loops:
Similar questions