Splitting strings in Java (read from a file, split, and create an ArrayList of objects)

preview_player
Показать описание
This series of videos is suitable for programmers with some programming or Java experience who want to learn object-oriented programming and dig deeper into some other Java features. This video is an introduction to String splitting in Java, which has replaced the StringTokenizer class. This video is suitable to watch after reading Chapter 7 of Java, Java, Java: Object-oriented problem solving, by Morelli, Walde, and Hoffman. However, the video is very straightforward and can also stand alone or accompany any other textbook that has introduced Java Strings and a little bit of object-oriented programming. Let's have some fun learning to program in Java!

Here is the video in which we create an ArrayList of objects from a file (one field to a line):

The classes in this video are in my github repository, available here:

Here is the Java, Java, Java text:

You can practice writing the String splitting code here*:

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

00:00 The original program
00:56 The new file format
03:47 How to split a string and construct an object
Рекомендации по теме