Java Tutorial: The for Loop in Java

Поділитися
Вставка
  • Опубліковано 5 вер 2024
  • Java For Loop Tutorial: This java tutorial on for loop will teach you about how to use the for loop in java. The for loop in java is about the initialization, condition and the updating. This video explains how each of these things work in java!
    ►This playlist is a part of my Complete Java Course playlist: • Java Tutorials For Beg...
    ►Source Code + Notes - codewithharry....
    ►Ultimate Java CheatSheet: codewithharry....
    ►Checkout my English channel here: / programmingwithharry
    ►Click here to subscribe - / @codewithharry
    Best Hindi Videos For Learning Programming:
    ►Learn Python In One Video - • Python Tutorial In Hin...
    ►Python Complete Course In Hindi - • Python Tutorials For A...
    ►C Language Complete Course In Hindi -
    • C Language Tutorials I...
    ►JavaScript Complete Course In Hindi -
    • JavaScript Tutorials I...
    ►Learn JavaScript in One Video - • JavaScript Tutorial
    ►Learn PHP In One Video - • Learn Php In One Video...
    ►Django Complete Course In Hindi -
    • Python Django Tutorial...
    ►Machine Learning Using Python - • Machine Learning Tutor...
    ►Creating & Hosting A Website (Tech Blog) Using Python - • [Hindi] Web Developmen...
    ►Advanced Python Tutorials - • Intermediate/Advanced ...
    ►Object Oriented Programming In Python - • Object Oriented Progra...
    ►Python Data Science and Big Data Tutorials - • Python Data Science an...
    Follow Me On Social Media
    ►Website (created using Flask) - www.codewithhar...
    ►Facebook - / codewithharry
    ►Instagram - / codewithharry
    ►Personal Facebook A/c - / geekyharis
    Twitter - / haris_is_here

КОМЕНТАРІ • 1,3 тис.

  • @abheygupta2332
    @abheygupta2332 3 роки тому +402

    Sir I literally spend most of my time with you on laptop😂😂

  • @sona_772
    @sona_772 Рік тому +36

    He is making so much efforts and the least we can do is like and share this videos. 🙂

  • @gundujamadar1685
    @gundujamadar1685 3 роки тому +73

    Course is getting more exciting and it's great that you are teaching us JAVA

  • @teamrzgaming9927
    @teamrzgaming9927 2 роки тому +73

    I literally got 50/80 in my final in comp by watching your videos.becsuse I got 7 / 80 in my second term and now I am working hard ..Thank uu very much 🙏

    • @arjun_ffh4x
      @arjun_ffh4x Рік тому +4

      Mera bhi halaat tumhare jaisa tha, fir mene videos wagera dekhe aur 60 up Marka milne lag Gaye (out of 80).

    • @carsimulater2475
      @carsimulater2475 Рік тому +3

      Icse?

    • @sunitashaw3818
      @sunitashaw3818 Рік тому +1

      @@carsimulater2475 i am in class 10 icse and i am watching his playlist😂😂😂

    • @arjux4724
      @arjux4724 11 місяців тому

      @@sunitashaw3818 is java in icse

    • @AshishKhetwal
      @AshishKhetwal 4 місяці тому

      @@sunitashaw3818 so?

  • @demigodtherapper483
    @demigodtherapper483 3 роки тому +237

    Thumbnail of these videos looks like a scared nursery kid trying to hide from the teacher behind his notes....to avoid the punishment😂😂😂

  • @codemc7376
    @codemc7376 2 роки тому +4

    6:55 answer
    Scanner input = new Scanner(System.in);
    System.out.println("range of odd numbers :");
    int rang = input.nextInt();
    for (int i=0; i < rang; i++){
    if (i%2 != 0) {
    System.out.println(i);
    }
    }

  • @soletsk5761
    @soletsk5761 3 роки тому +47

    Print (" Harry sir is the best teacher for computer science")
    Who agree hit like 👍

    • @rishabhprasad8333
      @rishabhprasad8333 3 роки тому +2

      This will show an error!

    • @soletsk5761
      @soletsk5761 3 роки тому

      Use ('''
      ''')

    • @vaibhav3852
      @vaibhav3852 3 роки тому

      while(true){
      System.out.println(" Harry sir is the best teacher for computer science");
      }

    • @soletsk5761
      @soletsk5761 3 роки тому +1

      @@vaibhav3852 I am taking about python

    • @vaibhav3852
      @vaibhav3852 3 роки тому +1

      @@soletsk5761 bro java ka coursee ha python ka nahi

  • @sushantchavan4774
    @sushantchavan4774 3 роки тому +41

    भावा तुझे वीडियो रोज बघतो Love From महाराष्ट्र💐

  • @muscleinjury3331
    @muscleinjury3331 3 роки тому +109

    7:46 you could also use the "i+=2" function to print odd numbers just by starting the loop from "1"

    • @shahzaibbukharii6473
      @shahzaibbukharii6473 3 роки тому +16

      yeah also this simple piece if code
      int n=20;
      for(int i=1; i

    • @alvaaaas
      @alvaaaas 3 роки тому +18

      Hey guys, but the question is to print n odd numbers and not to print odd numbers less than n...
      Suppose, if n = 5
      for(i=1; i

    • @MrFactistic
      @MrFactistic 2 роки тому

      yeah!

    • @ramsrivastava5578
      @ramsrivastava5578 2 роки тому +4

      @@alvaaaas for ( int i = 0; i

    • @pratyushgupta1702
      @pratyushgupta1702 2 роки тому

      yes

  • @lazycoder7843
    @lazycoder7843 3 роки тому +7

    only a teacher in my who teach better then everyone.... God bless you harry sir...

  • @goaheadskinit
    @goaheadskinit 3 роки тому +3

    Found a recommendation to your Channel on Reddit and thank God I did. Thank you for your videos.

  • @Dxiag123
    @Dxiag123 3 роки тому +10

    Great. Harry Bhai, you always make a smile on our face everytime. This revolution is going to be legendary.🙇🏻‍♂️🙇🏻‍♂️

  • @blinx_edits
    @blinx_edits 2 роки тому +6

    WHAT I DIDNT LEARN IN MY SCHOOL IN 3 YEARS , I LEARNED IN ONLY FEW DAYS FROM HARRY BHAIYA !!!! THANKYOU BHAIYA GREAT VIDEO

  • @babitanathsaharia9725
    @babitanathsaharia9725 3 роки тому +1

    18:27
    for (int n = 10; n>0; n--){
    System.out.println(n);
    }
    Sir done!!

  • @lyricspectrum6438
    @lyricspectrum6438 2 роки тому

    int n =15;
    for( i=1; i

  • @KajalSingh-xg8jp
    @KajalSingh-xg8jp Рік тому +28

    17:49
    import java.util.Scanner;
    public class ForLoop {
    public static void main(String[] args) {
    Scanner naturalNumber = new Scanner(System.in);
    System.out.print("Enter the total number of natural numbers
    that you want to print in reverse order: ");
    int num = naturalNumber.nextInt();
    for (int i = num; i != 0; i--) {
    System.out.println(i);
    }
    }
    }

    • @_sameerpandey
      @_sameerpandey 3 місяці тому +1

      i- - 😆😉

    • @ChikuTheMusafir
      @ChikuTheMusafir Місяць тому +1

      @@_sameerpandey it's a small mistake but big problem😅

  • @yscommunity
    @yscommunity 2 роки тому +12

    13:36
    Yes,it would be valid...the output would be negative numbers,also int is used in the program (int i=5)so there will be no problem while executing the program.The output would be negative numbers i.e integers up to the limit set(in this case it was 5)

    • @DK-js8cz
      @DK-js8cz Рік тому

      No bro, it is an infinite loop. From 5 to infinity.

  • @taherjohar9260
    @taherjohar9260 2 роки тому +6

    Wow.....really great explanation got the concept of for loop really well

  • @sushreesomamohanty1140
    @sushreesomamohanty1140 3 роки тому +10

    18:04 =
    public class PracticeSet05 {
    public static void main(String[] args) {
    int n = 10;
    System.out.println("First n natural numbers are: ");
    for(int i=0; i=0; i--){
    System.out.println(i);
    }
    }
    }

    • @Arie_-_jeev
      @Arie_-_jeev Рік тому

      👍🤛

    • @r.i.pfreaks3421
      @r.i.pfreaks3421 Рік тому

      n-1????

    • @r.i.pfreaks3421
      @r.i.pfreaks3421 Рік тому

      Bss n hoga

    • @AcceptableAxe
      @AcceptableAxe 7 місяців тому

      bhai n-1 bhi sahi hai kyuki woh n ko inlcude nhi kar rha it depends on the users choice

    • @bimalpatel2002
      @bimalpatel2002 2 місяці тому

      @@AcceptableAxe sahi nahi hai n-1 will print 49 to 1 in reverse excluding 50.

  • @anjalidixit2173
    @anjalidixit2173 3 роки тому +9

    Hi Harry...I am new to your channel and to be very honest your content is up to mark....to brush up Java concepts your videos are really helpful for beginners.......

  • @Sahill424
    @Sahill424 2 роки тому +6

    Because of you I am consistently coding java from 2 weeks 👍👍👍👍👍👍👍🤩🤩🤩🤩🤩🤩🤩🤩 Thanks 😊

  • @devjoychakraborty888
    @devjoychakraborty888 Рік тому +2

    17:54
    // Decrementing for loop:
    System.out.print("Enter a no. to print the natural nos. upto n: ");
    int f1 = sc.nextInt();
    System.out.println("Printing the natural nos. in reverse order:");
    for (int f = f1; f > 0; f--) {
    System.out.println(f);
    }

  • @hosmjrshinh2675
    @hosmjrshinh2675 3 роки тому +6

    18:00
    Scanner sc = new Scanner(System.in);
    System.out.println("Enter value of n (Natural number in REVERSE order)");
    int n = sc.nextInt();
    int i;
    for (i=n;i>0;i--)
    System.out.println(i);
    Thanks ♥

  • @akshatgajera7294
    @akshatgajera7294 2 роки тому +2

    10:10 We can Simply User : -
    for (int e=1; e

  • @memeboiii5781
    @memeboiii5781 3 роки тому +13

    Bhai I am class 9 student , learner complete python , c from you and java , but I want to use this knowledge , I want to earn some money , Pls make a video on how student such as me who are not eligible for job can earn with their programming knowledge ....

    • @memeboiii5781
      @memeboiii5781 3 роки тому +1

      @@vedantnn7 Thanks , hope Harry will make a video on it!

    • @arnavpandey1722
      @arnavpandey1722 3 роки тому

      Bro, i was in 8th when i started i used to make websites and some GUI application you can try but i didn't do that for money *_*

    • @rishurajsharma3130
      @rishurajsharma3130 3 роки тому

      Ya buddy same here
      I am also in class 9 or chhar languages aati hai but use Kaha Karu samajh nhi aati

    • @sujatajena267
      @sujatajena267 3 роки тому +1

      @@vedantnn7 same bro 7th class. I also think same.

    • @sujatajena267
      @sujatajena267 3 роки тому +2

      Yeah that's good but if you will get money you will be proud of you that what you are doing is actually worth it.
      And not like hindi and Sanskrit 😂😂😂

  • @HimanshuChoudhary-et5on
    @HimanshuChoudhary-et5on 2 роки тому +1

    question 4 pattern 2=
    public class fair {
    static void pattern(int n){
    for(int i=0;i

  • @RaviBhawsar-bk9fi
    @RaviBhawsar-bk9fi 2 місяці тому +1

    18:14
    // Quick Quiz--->
    System.out.println("How many reverse natural no.s do you want to print?");
    for (int i = sc.nextInt(); i>0; i--){ //*** (i!=0)--> stopping condition.
    System.out.println(i);
    }

  • @jatanyt1382
    @jatanyt1382 3 роки тому +16

    Dear Sir, I am Jatan Thanki and this is the answer of the Quick Quiz and I also I wanted user input so I just slightly changed the answer then the normal variable. I hope you like it!
    import java.util.Scanner;
    public class Main{
    public static void main(String[] args) {
    // The For Loop
    // Quick Quiz
    Scanner console = new Scanner(System.in);
    System.out.println("Please enter a number " +
    "to find all the numbers that are smaller than it "+
    "and to print them in reverse order"
    );
    int n = console.nextInt();
    for(int i = n; i>=0; i--){
    System.out.println(i);
    }
    }
    }
    Please do find any mistakes so that I can fix it:)

    • @UmmHii-gp5cr
      @UmmHii-gp5cr Рік тому +2

      Shouldn't it be i>=1 since its natural numbers

  • @newthings1277
    @newthings1277 2 роки тому +1

    Thank you very much brother

  • @nileshfagare8185
    @nileshfagare8185 2 роки тому +3

    harry sir your teaching is very impressive and my all doubts are clear it happened because of you

  • @hitarthshah5549
    @hitarthshah5549 5 місяців тому

    Thank you very much Harry Sir, I have written the first program of my college's java course by your helpful teaching. Thanks a lot ❤

  • @ayushdeveloper
    @ayushdeveloper 3 роки тому +7

    Thanks sir for this playlist
    You are really great

  • @meghashyamdixit7612
    @meghashyamdixit7612 8 днів тому

    Sir apka bahot bada fan ban gaya hoon.. 🙏😊

  • @jersingh6837
    @jersingh6837 Рік тому +1

    Thanks harry bhai for this course and the knowledge you given.

  • @Ani_vlog394
    @Ani_vlog394 3 роки тому +7

    Sir thank-you very much your videos helped me a lot❤️

  • @AFZALANSARI-oz9ch
    @AFZALANSARI-oz9ch Рік тому

    Hats off To Your Dedication Bhai ! And Pankhe Ghumege Laptop Drone Ban Jayga Was Epic HEHE

  • @zuhaibulhassan.
    @zuhaibulhassan. 2 роки тому +8

    We can also print odd using (2n+1) in place of i
    //print first 10 odd numbers
    int n=0;
    for(int i=0;i

    • @prasadkulkarni7066
      @prasadkulkarni7066 11 місяців тому

      19:08 bro it will only print 4 odd nors because ur I is 5

  • @egoxt9431
    @egoxt9431 Місяць тому

    in the odd number question of for loop ,i've used for and if statement cause it was a good way for revision:
    for(int i = 1;i

  • @muhsantech
    @muhsantech 3 роки тому +10

    18:21
    System.out.println("First 50 natural number in reverse order : ");
    for (int a = 50 ; a >= 1 ; a--){
    System.out.println("natural number "+a);
    }

  • @AbhinavSingh-cl3lj
    @AbhinavSingh-cl3lj Рік тому +4

    18:24
    public class Loop {
    public static void main(String[] args){
    Scanner sc= new Scanner(System.in);
    System.out.println("Enter");
    int b =sc.nextInt();
    for (int a=b; a!=0; --a)
    {
    System.out.println(a);
    }

    }
    }

  • @Shahrukhkhan-on6cf
    @Shahrukhkhan-on6cf 3 роки тому +3

    Lovelyy bro❤️❤️❤️❤️i really wonna have live discussions with u😍😍

  • @akashjajoriya8677
    @akashjajoriya8677 Рік тому +1

    THANK YOU BHAIYA i understand the how is work loop body in program?

  • @TheTop-tx9js
    @TheTop-tx9js 3 роки тому +9

    System. out. print ("Thanks sir for your java playlist you are awesome");
    respect++;

  • @naurtopatel
    @naurtopatel Рік тому +1

    18:20
    public class Main {
    public static void main(String[] args) {
    int n=1;
    for(int i=10;i>=n;i--){
    System.out.println(
    i
    );
    }
    }
    }

  • @bankingaashayein4687
    @bankingaashayein4687 3 роки тому +5

    Really I appreciate your hard work. Thanks harry sir

  • @Mr.anurag2008
    @Mr.anurag2008 3 роки тому +1

    For loop is the Easiest I prefer to use it instead of any other

  • @_Shaifali_CSB-
    @_Shaifali_CSB- 3 роки тому +40

    17:53
    Scanner sc = new Scanner(System.in);
    System.out.println("Enter the value of limit (n) :");
    int n = sc.nextInt();
    System.out.println("First " +n+ " natural numbers in reverse order ");
    for (int i=n;i>0;i--){
    System.out.println(i);
    }

  • @himankjeshwar8636
    @himankjeshwar8636 2 роки тому +4

    13:37 - This will create an infinite loop as your condition always remains true.

  • @riyatripathi6787
    @riyatripathi6787 3 роки тому +11

    Sir u are just amazing ❤️🙏Thank you so much ...seriously,,some students Students like me can learn something for you😀

  • @codinger360
    @codinger360 Рік тому +2

    18:25
    For(int i=n;i>0;i--)

  • @himanshukhatarkar7597
    @himanshukhatarkar7597 2 роки тому +4

    13:38
    it will print all the numbers from 5 onwards it'll be an infinite loop

  • @yashjha2193
    @yashjha2193 2 місяці тому

    18:20
    package org.example;
    public class Main{
    public static void main(String[] args) {

    for (int i = 100; i > 0; i -= 1){
    System.out.println(i);
    }
    }
    }

  • @hardikpanchal3839
    @hardikpanchal3839 2 роки тому +3

    Program for the quiz mentioned at 17:48
    public class loop_practice {
    public static void main(String args[]){
    int i;
    for(i=5;i!=0;i--){
    System.out.println(i);
    }
    }
    }

    • @surajitmukherjee3020
      @surajitmukherjee3020 2 роки тому +1

      Why did you take i=5, it is saying first "n" natural numbers. You need to take input from user as n, n can be 10,20 or even 1000

  • @Alexanderwashington1017
    @Alexanderwashington1017 2 роки тому +1

    Decrement natural numbers 1 to 100 using for loop
    class demo{
    public static void main(String args[]){
    for(int i = 100; I

  • @shivu6377
    @shivu6377 2 роки тому +13

    17:48 *Here is the program*
    import java.util.Scanner;
    public class Natural_Number_Printer_Reversed{
    public static void main(String [] args){
    Scanner sc = new Scanner(System.in);
    System.out.println("This program prints the natural number in reversed order from the given number");
    System.out.print("Enter the natural number to start from: ");
    int num = sc.nextInt();
    for (int i = num; i > 0; i--){
    System.out.println(i);
    }
    }
    }

  • @satyendrayadav4577
    @satyendrayadav4577 3 роки тому +1

    One heart to Banta h harry bhai aur waise bhi ye course whit hat jr se Lakho achha h.....

  • @AyushKumar-cr1et
    @AyushKumar-cr1et 3 роки тому +4

    Please upload Data structures course more frequently 🙏

  • @gaurav7903
    @gaurav7903 3 роки тому +9

    Harry sir,you didn't complete the syllabus of DS nd algorithm .its humble request to you please provide the remaining videos of Data structure and algorithm.🙏🙏

  • @programming_praneet1779
    @programming_praneet1779 2 роки тому

    17:51
    Quick quiz ans-
    int n = 7;
    for (int y=1; y

  • @creaturetrendy
    @creaturetrendy 3 роки тому +3

    11:45 I am thinking about this program since a long time..
    Everyone told only that general formula like n%2!=0..
    But today I found that ..
    Thank you Harry Bhai

    • @Phileoreal
      @Phileoreal 3 роки тому

      Brother this general formula is used to check whether a number is even or not but the formula that Harry told is to print even number or odd

  • @abhinav519
    @abhinav519 2 роки тому +1

    Yo vid 23 let's go
    Thank you sir 😊

  • @techproffesor5421
    @techproffesor5421 3 роки тому +36

    " one of the people who like this will be a billionaire one day "
    " Good Luck " 😂😂
    " Lallantap " 🎉🎉
    " Lallantap Video "👍👍

  • @AjinkyaGaikwad-zc1wu
    @AjinkyaGaikwad-zc1wu 3 роки тому

    those who dislike the video must be Paid tution tutors.
    thanks for the vdo

  • @shrabonisinha
    @shrabonisinha Рік тому +3

    int p = 10;
    for(int i = p; i>=0 ; i-- )
    System.out.println(i);

    • @shubzzz___
      @shubzzz___ 7 місяців тому +1

      Mam you are completed to all this java playlist 😮‍💨

    • @Anjalimeena2262
      @Anjalimeena2262 3 місяці тому

      10 To 0 print

  • @Chaitanyakashyap24
    @Chaitanyakashyap24 Рік тому +1

    18:25
    package java1;
    public class for_loop01 {
    public static void main(String[] args) {
    for (int i = 10 ; i>0 ; i--){
    System.out.println(i);
    }
    }
    }
    // DONE HAI JI

  • @suneelpandita3499
    @suneelpandita3499 3 роки тому +4

    Day 14 of commenting until Harry bhai makes a PyQt5 tutorial

  • @GIRINATH-on4wo
    @GIRINATH-on4wo Місяць тому

    18:11
    //Program to print first n natural numbers in reverse order: (Reverse Loop)
    System.out.print("Enter the range of numbers: ");
    int num = sc.nextInt();

    for(int i=num; i>=1; i - -){
    System.out.println(i);
    }

  • @zombiekiller7101
    @zombiekiller7101 3 роки тому +7

    Who is watching this during online classes 😂😂.

  • @habibpatoana2931
    @habibpatoana2931 5 місяців тому

    package Practice;
    import java.util.Scanner;
    public class forLoop {
    public static void main(String[] args){
    System.out.print("Enter a number: ");
    Scanner s1 = new Scanner(System.in);
    int n= s1.nextInt();
    for(int i=1; i

  • @musik4u868
    @musik4u868 2 роки тому

    Mazaaaa Aa gyaaaaaa Harrrrrrissssss Bhaiiiiii and i will seee youuuuuuuuuuu nextttttttt timeeeeee...........!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

  • @Yash-ld4wz
    @Yash-ld4wz Місяць тому +1

    10:10 harry bhai app also if condition lagake check odd number print karwa sakte ho ise she if else condition bhi revise ho jayega

    • @huzaifaoff313
      @huzaifaoff313 23 дні тому

      import java.util.Scanner;
      public class CHW_23_fore_loop {
      public static void main(String[] args){
      Scanner sc = new Scanner(System.in);
      int i;
      int i2 =10;
      System.out.println("Enter a number");
      for ( i = sc.nextInt(); i < i2; i++){
      System.out.println(i);
      }
      }
      }

  • @garvtech9721
    @garvtech9721 2 роки тому +1

    17:51 quick quiz answer
    for(int i=5; i>=0; i--){
    System.out.println(i);
    }

  • @satyammishra7413
    @satyammishra7413 3 роки тому +1

    Harry you are the best teacher on youtube

  • @starkysam
    @starkysam 2 роки тому +5

    18:13
    {
    System.out.println("Enter a Number");
    Scanner a = new Scanner(System.in);
    int num = a.nextInt();
    System.out.println("Natural Numbers in reverse Upto "+num);
    for (int i = num ;i>0; i-- ) {
    System.out.println(i);
    }

  • @KingCobraYT01
    @KingCobraYT01 6 місяців тому +1

    10:45
    More optimize code
    public class OddNumbers {
    public static void main(String[] args) {
    int limit = 10;
    System.out.println("Odd numbers from 1 to " + limit + ":");
    for (int i = 1; i

  • @rajveervishnoi1402
    @rajveervishnoi1402 3 роки тому +1

    18:11
    int n = 0;
    for(int i = 5 ; i>n ; i --){
    System.out.println(2n*i);
    }

  • @kushalchaulagain738
    @kushalchaulagain738 Рік тому

    18:25
    // Printing natural numbers till 100 (reverse)
    public class Main{
    public static void main(String[]args){
    for(int i=100;i>0;i--){
    System.out.println(i);
    }
    }
    }

  • @ankitasingh734
    @ankitasingh734 3 роки тому +2

    Thank you

  • @mayanksrivastava7540
    @mayanksrivastava7540 Рік тому

    public static void main(String[] args) {
    System.out.println("Enter");
    Scanner sc = new Scanner(System.in);
    //int f = sc.nextInt();
    int g = 0;
    for ( int i = sc.nextInt(); i>g; i-- ) {
    System.out.println(i);
    }
    }
    }
    Thank you bhaiya

  • @darshanghasti320
    @darshanghasti320 Рік тому

    18:27
    Int i=n
    For(i=10; i>n;i--){
    Print "i"

  • @baadshahkhan1560
    @baadshahkhan1560 2 роки тому

    Awesome sir it's understandable

  • @CodeWith_ik
    @CodeWith_ik 3 роки тому +1

    18:22
    int n = 0;
    for(int i=10;i>n;i--){
    System.out.println(i);

  • @CodingWithJas
    @CodingWithJas Рік тому

    We can also use like this to print 5 odd numbers:
    for(int i=1; i

  • @ranuagarwal7449
    @ranuagarwal7449 Рік тому

    Videos are very nice and clear

  • @mroyal8785
    @mroyal8785 Рік тому +1

    18:10
    Import java .util.Scanner;
    Class quiz{
    Public static void main ( Stri g args []){
    Scanner sc= new Scanner (System.in);
    Int n= sc.nextInt();
    System.out.println("enter the value ");
    For( int i =n; i>0;i--){
    System.out.print(i);
    }
    }

  • @indrajitroy4469
    @indrajitroy4469 3 роки тому

    18:04
    public class Odd
    {
    public static void main(String args[ ])
    {
    int n = 0;
    for (i = 5; i > n; i--)
    System.out.println(i);
    }
    }
    }

  • @HitarthShah-uk7jj
    @HitarthShah-uk7jj 5 місяців тому

    13:40
    According to me the condition will always remain true when you have written for(int i=5; i>0;i++) so it may run infinitely.

  • @devjoychakraborty888
    @devjoychakraborty888 Рік тому

    17:51
    System.out.println("Understanding the decrementing for loops");
    for (int i = 10; i >0 ; i--) {
    System.out.println(i);
    }

  • @drxroshanitiwari488
    @drxroshanitiwari488 9 місяців тому +1

    Class program
    {
    Public static void main(string args[])
    {
    int i
    For(i=1;i>=10;i--)
    S.O.P("the value of i=",")
    }
    }
    }

  • @ankitsingh-ow3yl
    @ankitsingh-ow3yl 6 місяців тому

    it is very excited to learn java from you.

  • @dheerajgchauhan9954
    @dheerajgchauhan9954 3 роки тому

    18:22 timming
    quick quiz3
    for(int i = 10;i>=1;i--){
    System.out.println(i);

  • @fardeenkhan4609
    @fardeenkhan4609 3 роки тому

    17:49 Quiz answer:
    int a = sc.nextInt();
    for (int i=a; i>0; i--){
    System.out.println(i);

  • @adnanshah75
    @adnanshah75 9 місяців тому

    17:46
    Quick quiz:
    int n = 10;
    for (int i = n; i>0; i--){
    System.out.println(i*2);

  • @y9tkhokhar680
    @y9tkhokhar680 3 роки тому

    7:56 for (int i=1;i

  • @omkargaikwad5015
    @omkargaikwad5015 Рік тому +1

    18:12
    System.out.println("Enter the number from which you want print the numbers: ");
    Scanner sc = new Scanner(System.in);
    int i = sc.nextInt();
    System.out.println("Enter the number upto which you want print the numbers: ");
    int n = sc.nextInt();
    for ( i=10 ; i>=n; i--) {
    System.out.println(i);
    }

  • @biswajeet9826
    @biswajeet9826 3 місяці тому +1

    Dhanyavaad Bhai!!
    Jai Hind!!

  • @preetiharjani1654
    @preetiharjani1654 3 роки тому

    18:09
    n Natural numbers in reverse order:
    for(int i=n ; i>0 ; i--){
    System.out.println(i);
    }

  • @ultrashortsfactory6999
    @ultrashortsfactory6999 3 роки тому +1

    To print first n natural numbers in reverse order :
    public class Program
    {
    public static void main(String[] args) {
    for (int i=9;i>0;i--){
    System.out.println(i);
    }
    }
    }

  • @frosty1014
    @frosty1014 5 місяців тому

    18:46 System.out.println("enter the n ");
    int n = sc.nextInt();
    int q;
    for (q=n;q>0;q--) { // jahan se jahan tak loop chaiyeh hai weseh likhte hai
    System.out.println(q); // and make sure koi logical error na ho .
    }

  • @ToonTV-yv2xz
    @ToonTV-yv2xz 2 роки тому

    7:46 I am loving this course