Decision making statement statements is also called selection statement. That is depending on the condition block need to be executed or not which is decided by condition. If the condition is true statement block will be executed, if condition is false then statement block will not be executed. In java there are three types of decision making statement.

  • if
  • if-else
  • switch                     

    if-then Statement

    if-then is most basic statement of Decision making statement. It tells to program to execute a certain part of code only if particular condition is true.

    Syntax :     If(Condition){

                                Statement(s);

                        }


Program:

  class Hello 
{
int a=10;
public static void main(String[] args) 
{
if(a<15)
{
System.out.println("Hello good morning!");
}
}
}

Output:

Hello good morning

Do you Know?
Progamming is what actually means ?

What is software development ?

How we categorized software development in different manner.

C Programming
C Plus Plus
Python
Java Development
Web Designing
Javascript
Mysql
Oracle
We cover all the programming concepts in various programming languages, this tutorials are very help full for bigener as well as Experience developer, for the ease of understanding we categorized programming in different manner likewise.