Reading from a text file with loops in Eclipse; Intro Java course Lesson 4 Video 7

preview_player
Показать описание
This series of videos is suitable for programmers with minimal (or no) programming experience who want to learn Java. This is the twenty-fourth video in the Introductory Java series, and the seventh video in lesson 4 (looping). In this video we're going to look at reading from a text file using Java and Eclipse using loops.

There is a suggested (free) book below that you could read along with the videos lessons. However, the video is very straightforward and can also stand alone or accompany any other introductory Java textbook. Let's have some fun learning to program in Java!

PLAYLIST

BOOK AND WEBSITE RESOURCES

Here is a video on the Scanner:

This video is suitable to watch after reading Chapters 2 and 3 of Introduction to Programming Using Java, by David J. Eck:

The Elements of Java Style text is available here*:
*As an Amazon Associate I earn from qualifying purchases. Your purchases help me continue to bring you content!

The Open JDK page is here:

The Eclipse IDE page is here:

PRACTICE
You can practice reading from a file without a loop here*:

You can practice writing the AIReader program that reads from a file with a loop here*:

If you want to earn credit for learning to code, take an online course at CCRI! These videos are part of the Java Programming course:

GET THE CODE

The github repository with all of the code examples for Lesson 4 is here:

RESOURCE ATTRIBUTIONS
Oracle File class documentation:

Data extracted from:
Daniel Zhang, Nestor Maslej, Erik Brynjolfsson, John Etchemendy, Terah Lyons, James Manyika, Helen Ngo, Juan Carlos Niebles, Michael Sellitto, Ellie Sakhaee, Yoav Shoham, Jack Clark, and Raymond Perrault, “The AI Index 2022 Annual Report,” AI Index Steering Committee, Stanford Institute for Human-Centered AI, Stanford University, March 2022.

Java JDK image from Oracle:

Java coffee cup image:

00:00 Welcome, what we've covered and what we're going to talk about
00:27 What is a text file
01:13 Where to place the text file in Eclipse
02:49 How to read from a text file in Java
09:13 How to read a complicated text file in a loop
Рекомендации по теме
Комментарии
Автор

Thanks Maggy, another well-run lesson!
It would have great to see the final demonstration on screen.
It is necessary to clear the buffer if and only if you read a string after having read a type number seems to me to summarize the matter simply.

french-coding