if – else statements in java in hindi

Introduction

if – else statements भी  if statements  किस तरह होते हैं | लेकिन यह  if – else statements में आप  condition  पास होने पर भी कुछ  statement  को execute करवा  सकते  है |
if- else statement hindi

syntax for If – else statements 
if (condition)
{
first statement
}
else
{
second statement
}
program 
int a = 8 , b = 4;
If (a > b)
{
system.out.println(“A is greater than B”);
}
else
{
system.out.println(“B is greater than A”);
}


Leave a Reply

Your email address will not be published. Required fields are marked *