Java Programming Tutorial – 22 – for Loops

///Java Programming Tutorial – 22 – for Loops

Java Programming Tutorial – 22 – for Loops

FavoriteLoadingAdd to favorites

Facebook –
GitHub –
Google+ –
LinkedIn –
reddit –
Support –
thenewboston –
Twitter –

source

Java468x60
By |2019-04-12T17:28:59+00:00April 12th, 2019|Java Video Tutorials|32 Comments

32 Comments

  1. Nick of Time April 12, 2019 at 5:29 pm - Reply

    thank you!
    8^)

  2. bryan ishmael April 12, 2019 at 5:29 pm - Reply

    how about display your name 5 times?

  3. yakp sipahi April 12, 2019 at 5:29 pm - Reply

    thank you bucky

  4. Kwix ™ Graphic designer April 12, 2019 at 5:29 pm - Reply

    counter+=3 means counter = counter + 3 if you didn't get it 😉

  5. XX SanoXX April 12, 2019 at 5:29 pm - Reply

    Lol this was released 10 years ago!!! Ahh nevermind it's useful

  6. I do this with if else if statement, and I dont know how to stop this for loop.
    The output must be like:
    3
    Higher!
    5
    Lower!
    4
    Congratulations!

    But mine was like:
    4
    3
    Lower
    And it stops until 1-5 showsxl

  7. Ricardo P April 12, 2019 at 5:29 pm - Reply

    I dont knoq why i did not manage to understand how 'for' worked in Java but thanks to your explanation i get it now. Even tho i prefer using do-while… when possible haha.

  8. Pllutus April 12, 2019 at 5:29 pm - Reply

    You made this really easy to understand. Thanks a lot!

  9. Devashan Pillay April 12, 2019 at 5:29 pm - Reply

    So instead of declaring a variable and giving it a starting number I can just use counter? Just a syntax change?

  10. [CAMP] fabian_ftn April 12, 2019 at 5:29 pm - Reply

    I am having problem with the setup of eclipse

  11. Ahmad Hajoj April 12, 2019 at 5:29 pm - Reply

    You made the java easy for me

  12. Ahmad Hajoj April 12, 2019 at 5:29 pm - Reply

    Man ur a beast come back please bucky ur the best teachef ive meet

  13. RatchetCakez April 12, 2019 at 5:29 pm - Reply

    how to you make the numbers go down though? (5, 4, 3, 2, 1, 0)

  14. Soner Öztürk April 12, 2019 at 5:29 pm - Reply

    Usually programmers use 'int i' instead of 'int counter'. Easier and it's too common like the i's only job to create an integer for the for loop 😀

  15. Airee -Chan! April 12, 2019 at 5:29 pm - Reply

    So helpful tutorial!

  16. sella blah April 12, 2019 at 5:29 pm - Reply

    thanks man this is so clear

  17. Div Gupta April 12, 2019 at 5:29 pm - Reply

    exclusive for intelliJ users there are lot of super useful commands out there like
    sout + tab = System.out.println();
    psvm = public static void main(String []args){}
    fori = for( i = 1 i <=0 i++){}
    i found and discovered many myself but these are the most and frequently being used in my code hope helpful for you and sves you from a typing all the stuff

  18. Elisa L April 12, 2019 at 5:29 pm - Reply

    What the difference between while and for loops? In which situation should you use 'for' rather than 'while'?

  19. Bibek Neupane April 12, 2019 at 5:29 pm - Reply

    before opening while loop you can enter System.out.println("enter ane 10 number");

  20. Al Dave April 12, 2019 at 5:29 pm - Reply

    basic for loop average 🙂

    ===============

    double grade, total =0,average;
    int i,a;
    Scanner in = new Scanner (System.in);
    System.out.println("Input how many quiz: ");
    a= in.nextInt();

    for(i = 1;i<=a;i++) {
    System.out.println("Input grade for "+i);
    grade = in.nextDouble();
    total = total +grade;
    }
    average = total/a;
    System.out.printf("your average %5.2f" ,average);

  21. Govind v April 12, 2019 at 5:29 pm - Reply

    Are all of you kids around here?

  22. Glowmate April 12, 2019 at 5:29 pm - Reply

    No one told me that The Winter Soldier knows Java.

  23. michaela menzel April 12, 2019 at 5:29 pm - Reply

    THANKS FOR HELPING ME WITH MY HOMEWORK BUD

  24. Patrascu Lucian April 12, 2019 at 5:29 pm - Reply

    import java.util.Scanner;

    class mere {
    public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int increment, end, counter;
    System.out.println("Enter your starting number: ");
    counter = sc.nextInt();
    System.out.println("Enter your ending number ");
    end = sc.nextInt();
    System.out.println("Enter the increment number: ");
    increment = sc.nextInt();
    sc.close();
    System.out.println("Your numbers are:");
    for(counter=counter; counter<= end; counter= counter + increment)
    {
    System.out.print(counter+"; ");
    }
    }
    }

  25. Priyanka Murmu April 12, 2019 at 5:29 pm - Reply

    Can somebody tell me when to type Println and when just Print?

  26. ERIC NDENZAHO April 12, 2019 at 5:29 pm - Reply

    Thank you, your video are helping,….. I am glad I found your account

  27. Appficial April 12, 2019 at 5:29 pm - Reply

    for (int i=0; i< 100; i++) { System.out.println("great video!"); }

  28. ForFyve Ziro April 12, 2019 at 5:29 pm - Reply

    I love you

  29. Saurabh Kumar April 12, 2019 at 5:29 pm - Reply

    the college isn't the best place to learn programming so newboston is where i go……

  30. Streampy Hosting April 12, 2019 at 5:29 pm - Reply

    nice video, I started laughing when u said twenty one … xD

  31. chris pawlak April 12, 2019 at 5:29 pm - Reply

    stay moist

  32. Harrison Jones April 12, 2019 at 5:29 pm - Reply

    Noice

Leave A Comment

*