As you know, the statement is the instruction given to the computer that performs specific types of work. They can make decisions and repetitive tasks.
The statements are of the following three types.
Statement | Description |
---|---|
Type declaration Statement | To declare the type of variables being used in the program. |
Arithmetic Statement | To complete the arithmetic operation between constants and variables. |
Control Statement | To control the sequence of execution of different statements of the program. |
Control Statement
The statements that control the execution flow of the program are known as control statements.
In a program, we modify and repeat the data several times. We need some tools for these modifications that will control the flow of the program, and to perform this type of tasks Java Provides control statements.
There are four types of control statements:
- Sequence Control Statement
- Selection or Decision Control Statement
- Repetition or Loop Control Statement
- Case Control Statement
In the next chapter, you will study the control statement in detail.
Keep W3schools Growing with Your Support!
❤️ Support W3schools