Copyright

Ch 3: Java Control Statements

About This Chapter

This chapter covers the basics of Java control statements. With engaging and short tutorial lessons, the chapter can help you quickly learn about the functions of various control statements in Java.

Java Control Statements: Chapter Summary

This chapter covers control statements used in the Java programming language. These Java tutorial lessons define and explain the purposes of several types of control statements, including if statements, switch statements, nested switch statements and more.

These bite-sized lessons are taught by expert instructors who efficiently explain control statements using clear definitions and illustrative examples. Each lesson comes with a self-assessment quiz you can use to make sure you fully comprehend the basics of Java control statements.

This chapter covers following topics:

  • If statements
  • Examples of Java statements
  • Java's 'Hello World' print statement
  • Switch statement syntax
  • Break, continue, return and nested switch statements

Java is a trademark of the Oracle Corporation, which is not affiliated with Study.com.

6 Lessons in Chapter 3: Java Control Statements
Test your knowledge with a 30-question chapter practice test
Java Statements: Definition & Examples

1. Java Statements: Definition & Examples

In this lesson, we'll learn the definition of a Java statement and discuss some of the different types. We'll also explore some working code examples for this important programming concept.

Java's 'Hello World': Print Statement & Example

2. Java's 'Hello World': Print Statement & Example

Hello World is a simple Java program, for many the first they learn, that teaches syntax and components of the Java programming language. In this lesson, we will learn how to write your very first computer program using the Java programming language.

Java: If Statements

3. Java: If Statements

This lesson will explain how to use if statements in Java. A few examples of how to create short Java programs that use these statements will also be provided to demonstrate their usage.

Switch Statement in Java: Example & Syntax

4. Switch Statement in Java: Example & Syntax

The switch statement in Java is an effective way to branch a program based on specific conditions, and can be used in place of writing an extended if statement. In this lesson, we'll leran the syntax of the command and look at a few examples.

Nested Switch Statements in Java

5. Nested Switch Statements in Java

In Java, it's possible to use nested switch statements to provide the possibility of a whole new set of choices within the initial choice. In this lesson, we'll learn more about nested switch statements.

Java Statements: Break, Continue & Return

6. Java Statements: Break, Continue & Return

Sometimes we need to get out of certain situations, keep going on the path we're on, or hand the keys to someone. Java provides control statements that allow us to stop processing, continue processing, or return control back to someone else. This lesson will define these statements and provide working code examples.

Chapter Practice Exam
Test your knowledge of this chapter with a 30 question practice chapter exam.
Not Taken
Practice Final Exam
Test your knowledge of the entire course with a 50 question practice final exam.
Not Taken

Earning College Credit

Did you know… We have over 200 college courses that prepare you to earn credit by exam that is accepted by over 1,500 colleges and universities. You can test out of the first two years of college and save thousands off your degree. Anyone can earn credit-by-exam regardless of age or education level.

To learn more, visit our Earning Credit Page

Transferring credit to the school of your choice

Not sure what college you want to attend yet? Study.com has thousands of articles about every imaginable degree, area of study and career path that can help you find the school that's right for you.

Support