Lecture 4
Lecture 4
Unit 1
Lecture 4
Lecture 4
• Control Flow
• Encapsulation
• Defining Classes in Java
Control Flow in Java
Java compiler executes the code from top to
bottom. The statements in the code are
executed according to the order in which they
appear.
However, Java provides statements that can be
used to control the flow of Java code.
Such statements are called control flow
statements. It is one of the fundamental
features of Java, which provides a smooth flow
of program.
Java provides three types of control flow statements.