Introduction to Flow-Control in JAVA
Flow-Control in JAVA
What is Flow-Control?
Flow-Control describes the order in which the statements will be executed at runtime.
Types of Flow-Control Statements
-
- Selection Statements:
- Among several options/cases only one will be selected and executed.
-
if-else
statment -
switch()
statment
-
- Iterative Statements:
- A group of statements will be executed Iteratively.
-
while()
loop statment -
do-while()
loop statment -
for()
loop statment -
for-each
loop statment (1.5v)
-
- Transfer Statements:
-
break
statment -
continue
statment -
return
statment -
try-catch-finally
statment -
assert
statment (1.4v)
So, these are the Flow-Control statements in JAVA. We will discuss each of them In-detail & various pit-falls about them in up-comming posts.
Comments
Post a Comment