Java For Loop

Loop In Hindi – For Loop In Java In Hindi

Java

Loop In HindiFor Loop In Java In HindiJava Language Me Aapko Loops Provide Kiye Gye Hai | Java For Loops Ki Help Se Aap Ek Hi Statement ko Bar Bar Execute Karva Sakte Hai |

Also ReadWhile And Do While Loop

Jab Tak Kisi condition Ka Satisfaction Nhi Hota Hai Tab Tak Loop Ka statement repeat Hota Rahta Hai |

For Loop In Java In Hindi

Java For Loop in Hindi Ek Statement Loop Hoti Hai. Jab Condition True Hoti Hai Tab hi Statement Execute Hote Hai.

For Loop Ko Ham Example Ke Sath Understand Karte Hain |

Syntax For Loop :-

for (statement 1; statement 2; statement 3) {
  // code block to be executed
 }
  • statement 1:- Ye Keval Ek Bar Execute Hoti Block Se Pahle or Yaha Par Loop Starting Value Di Jati hai|
  • statement 2:- Yaha Par Condition Defines Ki Jati Hai Code Block Ko Run karne Ke Liye |
  • statement 3:- Ye Increment Or Decrement Ke Liye Istemal Hota Hai |

Also Read – Java Switch

Example:

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

Output:

0
1
2
3
4

Friends Agar Me Aapse Kahu Ki MasterPrograming ko 10 bar Print Karana Hai to Aap Kiya Karenge | Mere Hisab Se Aap For Loop in Hindi Ka Hi Istemal Karenge Kyoki Aap Bar Bar System.out.println() Function se Print Nhi Kara Sakte Hai | Lyoki Ye acche Programmer ki Pahchan Nhi Hoti Hai |

Example:

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

Output:

Masterprograming
Masterprograming
Masterprograming
Masterprograming
Masterprograming
Masterprograming
Masterprograming
Masterprograming
Masterprograming
Masterprograming

For Each Loop in Java In Hindi

Java Foreach Kaam Karta Hain Arrays And Objects Ke Variable Par Or Agar Arrays And Objects Ke Alava Different Data Type Par uninitialized Variable Error Show Karta Hain |

Syntax:

for (type variableName : arrayName) {
  // code block to be executed
}

Example:

public class Main {
  public static void main(String[] args) {
    String[] fruits = {"Apple", "Mango", "Gavava", "Grapes"};
    for (String i : fruits) {
      System.out.println(i);
    }    
  }
}

Output:

Apple
Mango
Gavava
Grapes

Aapne Kiya Learn Kiya ?

Is Article Mai Aapne Loops 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 For Loop 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 *