Java Break And Continue

Java Break And Continue Statement in Hindi

Java

Java Break And Continue Statement in HindiBreak and Continue Function ko Jab Istemal Karte Hai Jab Hame Koi Statement Ko Break Karna ya Continue Karta Hota Hai.

Java Break And Continue in Hindi

Break And Continue in Java In Hindi Ko Or Accha Samanjh Ne Ke Liye Iske Kuch Examples Dekhte Hai |

Read Also : Java For Loop

Java Break In Hindi

Break Statement Ka Istemal Loop Ko Rukne Ya Terminate Karne Ke Liye Hota Hai And Aap Iska Flow Diagram Or Syntax And Examples Ke Sath Understand Kar Sakte Hai |

Flow Diagram :

break and continue statement
break and continue statement | difference between break and continue

Syntax :

for (statement 1; statement 2; statement 3) {
  // code block to be executed
  if(condition){
    break;
  }
 }

Example:

public class Main
{
	public static void main(String[] args) {
	    for(int i = 0; i<10; i++){
		    System.out.println(i);
		    if(i==2){
		        break;
		    }
	    }
	}
}

Upper Diye Gaye Code Me For Loop Ka Istemal Kiya Gaya Hai Or Us For Loop Ke Under Ek Condition Lagaya Gaya Hai ki Agar i== 2 ke equal Hai to For Loop Terminate Ho Jaye Yani Ki Break Ho Jaye. Iska Code Ka Output Aap Niche Dekh Sakte Hai |

Also ReadJava If Else And Else If

Output:

1
2

Java Continue In Hindi

Continue Statement Ka Istemal Loop Ko Lagatar Yani ki Continue Karne Ke Liye Hota Hai.

Jis Statement Ke Liye Condition Lagaya Hota Hai To Us Statement Ke Number Ko Skip Yani ki Continue Kar Deta Hai Or Wo Output Me Print Nhi Hota Hai |

Aap Iska Flow Diagram Or Syntax And Examples Ke Sath Understand Kar Sakte Hai |

Flow Diagram:

break and continue statement | difference between break and continue statement in c with example
break and continue statement

Syntax :

for (statement 1; statement 2; statement 3) {
  // code block to be executed
  if(condition){
    continue;
  }
 }

Example:

public class Main
{
	public static void main(String[] args) {
	    for(int i = 0; i<10; i++){
		    System.out.println(i);
		    if(i==2){
		        continue;
		    }
	    }
	}
}

Upper Diye Gaye Code Me For Loop Ka Istemal Kiya Gaya Hai Or Us For Loop Ke Under Ek Condition Lagaya Gaya Hai ki Agar i== 2 ke equal Hai to For Loop Continue Ho Jaye Yani Ki Skip Ho Jaye. Iska Code Ka Output Aap Niche Dekh Sakte Hai |

Output:

0                                                                                                                               
1                                                                                                                                                                                                                                                             
3                                                                                                                               
4                                                                                                                               
5                                                                                                                               
6                                                                                                                               
7                                                                                                                               
8                                                                                                                               
9  

Aapne Kiya Learn Kiya ?

Is Article Mai Aapne Break And Continue In Hindi Ke Bare Mai Learn Kiya Hai |

Yadi Aapne  HTML Full Course  And CSS Full Course And Python Full Course And PHP Full Course Nhi Read Kiya Hai To Aap Vah Bhi Read Kar Sakte Hai |

Friends Mujhe Umeed Hai Ki Aapko Loop With Break And Continue In Java In Hindi Ke Bare Mai 100% Jankari Ho Gayi Hogi | Agar Aapko Learn Karne Main Dikkat Aa Rahi Hai To Aap Mere Se Contact Kar Sakte Hai |

Leave a Reply

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