Skip to main content

Posts

Showing posts with the label Java Decision making statement| Decision making statement in Java

Decision Making Statements in Java Programming Language.

 Their are 3 decision making statement in Java. Here where ever you find the if underlined like this( if ) then it is related to statement. 1) if statement. 2) if else statement. 3) if-else-if statement. So lets discuss one by one about each statement. 1) if statement:- if statement is used in programming for checking the given condition is true or not. If the condition in the if block is true then the block executes otherwise the programme terminates. Lets understand it by its syntax.   Here in the syntax we have condition in the if block, if the the condition which we have putted is true then the code which is written in the block will executes otherwise the programme ends their.  2) if else statement:- if else statement is used in programming for checking the given condition is true or false. If the condition is true then the if block is executed otherwise the else block is executed. Lets understand it by its syntax. Here in the syntax a condition is given in the if statement, i