> ## Content Index
> Fetch the complete content index at: https://www.ggorantala.dev/llms.txt
> Use this file to discover other available public pages before exploring further.

# Control Statements In Java
- URL: https://www.ggorantala.dev/control-statements-in-java/
- Published: 2024-04-13T14:36:03.000Z
- Updated: 2024-05-18T01:11:31.000Z
- Author: Gopi Gorantala
- Tags: Learn Java

## Introduction

When you write code or a program, the program executes the blocks in the order they appear from top to bottom. Control flow statements help break up this execution flow by providing decision-making, looping, and branching capabilities. They allow your program to execute specific code blocks conditionally.

> In other terms, control statements direct the flow of execution in a program. 

Control statements aid decision-making, looping through code blocks and controlling the execution sequence.

Using control statements, developers can create programs that make decisions and perform different operations based on inputs and conditions.

## Types

There are 3 types of control statements:

1. Decision-making statements
  1. `if-then`
  2. `if-then-else`
  3. `switch`
2. Looping statements
  1. `for`
  2. `while`
  3. `do-while`
3. Branching/Jump statements
  1. `break`
  2. `continue`
  3. `return`

Learn more about the control statements and how to use them in the next lessons.