Skip to main content

Posts

Control Structure in Java Programming

Control Structure Control structure or control statements are the statements which control the flow of program execution. Control Structures are just a way to specify flow of control in programs. Any algorithm or program can be more clear and understood if they use self-contained modules called as logic or control structures. It basically analyzes and chooses in which direction a program flows based on certain parameters or conditions. These are of four types. 1. Conditional or Decision making statement. Example : if, if-else, nested if-else 2. Selection statement and branching. Example : else if ladder, switch, nested switch 3. Iteration or looping. Example for, while, do-while, for each loop 4. Jump statement. Example: break, continue Decision Making and Branching Decision Making or Conditional Statements In programming we face some situations where we want certain block of code to be executed when some condition is fulfilled. Decision maki...