If Statements In Java

Dear Students, aaj ke is Lecture me hum if statements In java ke bare main padege. Yani ke if statements kya hote hai or java main kaise kaam karte hai. Types of if statements in java aadi se related ye sare topic ham is lecture main cover karege.

Lectures Covering Topics

  • Introduction To If Statements In java In Hindi
  • Types of If Statements In java In Hindi
  • If Else if Statements In Java
  • Nested If Statements In java In Hindi

If statements Control statements ka he part hai. Control statements yani ki ese statements jo poore program ko control karte hai. Jab programmer user ke input par depend hota hai. Tab programmer control statements ka use karta hai.

Introduction To If Statements In java In Hindi

To students if statements ko samjhna bahut he simple hai. jaise ke mene aapko bataya hai ki program ko control karne ke liye if statements ka use karte hai. Java language main agar kisi statement ka use kisi condition ke base par kiya jata hai. Tab if statements ka use kiya jata hai.

If statements ko conditional statement bhi kahte hai. Isme hame eak condition de hoti hai. Joki true hogi ya fir false aap true ya false jis par bhi apna operation perform karna chahte hai kar sakte hai.

If ke sath hum hamesha else ka bhi use karte hai. If ki condition true hone par wo if statement ko execute karta hai. Otherwise else ko execute karta hai. Aisa jaroori nahi hai ki aap else ka use karo jab aapko condition false hone par bhi koi operation perform karna hai. tabhi aap else ka use karo.

Types of If Statements In Java In Hindi

Java language main hum 4 tarah se conditional statement ko use kar sakte hai. Hum hamesha apne requirements ke according apne statement ka way choose karte hai.

  • If statement in java
  • If-else statement
  • If else-if ladder Statements In Java
  • Nested if Statements In Java

If Statement In Java In Hindi

Agar statement ki condition true hoti hai. Tab code ko execution karane ke liye Java language main single if statements ka use kiya jata hai. Aap neeche syntax or example dekh sakte ho.

Syntax of if statements in java

Yah hai aapka syntax of if statements.

Example of if statement in Java

Output

if statements in java

If-else statement In Java In Hindi

If else statements bi-directional selection control statements hai. Jiska use hum 2 possible action ke code ko execute karne ke liye karte hai. Yani ki jab condition true or false hai or dono he condition par program ko execute karane ke liye if else statements ka use karte hai.

Syntax of if else statements in java

Example of If else Statements

Output

2 if statements in java in hindi

If else-if Statement In Java – If else-if ladder Statement In Hindi

If else-f ladder statement ka use eak code ko multiple condition ke sath execute karane ke liye kiya jata hai. Jab hame eak se jayada condition de ho or sabhi condition ke true or false hone par he koi code execute kare tab hum iska use karege.

Syntax

Example of  If else-if Statement In Java – If else-if ladder Statement In Hindi

Output

3 if statements in java in hindi

Nesting If statements In Java

If else statements ke andar fir se if else statements ko likhna hi nesting if else statements kahalata hai. Nesting if else ka use tab kiya jata hai jab hame condition ke andar koi condition dee jati hai.

Syntax of nesting if statements in java

Example of nesting if statements in java

Example main hum dekhenge ki 3 number main se eak largest number ko find karnge.

Output

4 if statements in java

Note:- Jaisa ki me aap logo ke pahle bhe bta chuka hun. Ki sabhi programmers ke problem ko solve karne ke logic alag alag hote hai.

Related Lecture

Dear Students, main aasha karta hun ki aapko if statements In java Ka Lecture padh kar samjh me aa gaya hoga ki Java language main if statements ka use kaise karte hai. Yadi aapako (if statements in java ) ke lecture se related koi bhi problem hai to aap hume comment karke puch skte hai.

Share This Post On

About Author

Thakur Aman Singh

Hey, I am Aman Singh Tomar from Taj City Agra. Through This Blog I want to share my Knowledge with all of you. Read More >>

Leave a Reply

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