Control Statements:Selection statement ,Iteration statement and Jump statement in Java
Control statements in java : It is a statement that determines whether the other statements will be executed or not. It controls the flow of a program. control statements help with the control flow of the program. Control flow is the order in which the statements execute. Control Statements can be divided into three categories, namely A] Selection statement B] Iteration statement C] Jump statement Let us discuss above statements one by one as follow: A ] Decision-Making /Conditional /Selection statements: Statements that determine which statement to execute and when are known as decision-making statements. The flow of the execution of the program is controlled by the control flow statement. Selection statements allow your program to choose different paths of execution based upon the outcome of an expression or the state of a variable. Java supports two selection statements: I ] if statement: II ] switch statement: I] If st...
Comments
Post a Comment