Flow Control:-

To learn a program it is very interesting part. In the program flow of control is the main concept which enables one to write a program in such a way that different condition can lead to different outputs.

It allows one to create possibilities of the execution path which depends on the type of input and various other factors.




EXAMPLE:-

1:-Let x =4
2:-If x is greater than 5
3:-Say "You are allowed in the group"
4:-Else say "You are not allowed in the group"

In this example, the control head will go through the first and second line then it will skip the 3rd line and directly go to the 4th line.
If the value of x is greater than 5 then control head will run through only first three lines of codes and will never go to the 4th line.
And ,this is how the flow control is managed.

Learn about Java Runtime Environment:- CLICK HERE

Subscribe my YouTube channel:- CLICK HERE

Post a Comment

Previous Post Next Post