File input and output - Basic Java Fast (38)

preview_player
Показать описание
The video demonstrates the file input and output approaches for Java. To read from a text file, we generate a File object, and then connect it to a Scanner object which reads text. When reading from a file, we have to handle the exception of failing to find the file. We also create objects using the PrintWriter class to write text to a text file.

You'll learn most by trying my code while watching the video.

0:39 - File object instantiation
2:48 - Scanner object instantiation
4:15 - Reading strings
9:00 - Reading numbers
11:02 - FileNotFoundException
12:01 - Writing to text file

Playlist of my Java course

Playlist of my Java examples
Рекомендации по теме
Комментарии
Автор

Very nice, I can now understand R/W File.

TresorChun