Learn to use for, while, for-each, and if-then-else statements to control program flow in Java.
- [Instructor] In this video I'll explain nine…flow control statements from the Java language.…In order to explain these flow control statements…we'll use three classes: a Person class,…an Age Category Enum and a Person Test.…Note that the Person class is contained…in the flow control package of your exercises file folder.…The Person class contains two strings for family name…and first name and age,…an age category enum…and a list of strings that we'll call hobbyList…and as the name indicates it will contain a list of hobbies.…
Our enumeration AgeCategoryEnum contains these values.…Let's look at the before method…of our test class Person Test.…In this we're creating a new person,…and then we're assigning values using if else constructs.…Here, note that there's an age gap.…This category will be unknown.…The reason that it will be unknown…is that the default value within the enumeration…is going to be zero.…
Also, we initialize the hobbyList by accessing the list…and then using list add method…to add these particular hobbies.…
Author
Released
2/1/2017- The IMQAV model
- Downloading software
- Installing and setting up a Java coding environment
- Mock tests
- Code coverage
- Using windows, views, and modes in IntelliJ IDEA
- Creating classes and attributes
- Creating constructors
- Casting variables
- Matching literals with regular expressions
- Libraries
- Regular expressions
- Design patterns
Skill Level Intermediate
Duration
Views
Related Courses
-
Java: Database Integration with JDBC
with David Gassner2h 51m Intermediate -
NumPy Data Science Essential Training
with Charles Kelly3h 54m Intermediate
-
Introduction
-
Welcome1m 3s
-
Using the exercise files1m 8s
-
-
1. Getting Started with Java
-
JVM languages1m 8s
-
Downloading software3m 10s
-
Installing software6m 57s
-
2. Test-Driven Development
-
Introduction to testing2m 15s
-
Types of tests5m 54s
-
Mock tests2m 15s
-
Code coverage1m 47s
-
-
3. IntelliJ IDEA
-
Windows, views, and modes5m 15s
-
Projects5m 47s
-
Editor basics5m 36s
-
Refactoring2m 38s
-
Code execution1m 23s
-
Debugging2m 4s
-
-
4. Object-Oriented Java
-
Object-oriented principles1m 20s
-
Primitives59s
-
Strings4m 12s
-
Classes and attributes4m 13s
-
Classes and methods3m 46s
-
Classes and constructors2m 44s
-
Exception handling3m 27s
-
Enumerations5m 26s
-
Casting3m 19s
-
Generics1m 40s
-
Annotations1m 59s
-
Program flow control9m 43s
-
-
5. Libraries
-
Install and use libraries5m 15s
-
gson2m 40s
-
StringUtils1m 56s
-
-
6. Regular Expressions (Regex)
-
Literals4m 23s
-
Predefined character classes1m 28s
-
Regex quantifiers2m 40s
-
Regex boundaries and anchors1m 26s
-
Regex examples1m 55s
-
7. Reflection
-
Introduction to reflection1m 17s
-
Introspect fields2m 50s
-
Introspect methods2m 51s
-
Introspect constructors3m 15s
-
Introspect annotations2m 5s
-
-
8. Design Patterns
-
Singleton patterns2m 19s
-
Decorator patterns3m 23s
-
Visitor patterns2m 32s
-
9. Applying Data Science
-
Magic squares algorithm5m 11s
-
Adjacency matrix5m 42s
-
Magic characteristics1m 35s
-
Building magic cubes5m 31s
-
Conclusion
-
Next steps53s
-
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.
CancelTake notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.
Share this video
Embed this video
Video: Program flow control