Java For Beginners: While, Do While & For Loops (7/10)

Sdílet
Vložit
  • čas přidán 27. 08. 2024
  • Want more? Explore the library at www.codecourse...
    Official site
    www.codecourse...
    Twitter
    / teamcodecourse

Komentáře • 210

  • @Naderade
    @Naderade Před 7 lety +260

    Thank you you are so much better than my teacher

  • @jawadnoor2298
    @jawadnoor2298 Před 4 lety +44

    0:18 While Loop
    5:25 for loop
    8:36 do while loop

  • @yolog37
    @yolog37 Před 5 lety +54

    That is the most straightforward explanation I've come across so far!!! Thank you very much! Spot on!

  • @axon589
    @axon589 Před 8 lety +48

    Wow this is an amazing video. I had a really hard time understanding the difference between while and do while and now, because of your video, I do.

  • @Dowggdee
    @Dowggdee Před 9 lety +94

    whoa, he's good hey...... he basically covered all three loop functions within a time span of 11 minutes.

    • @cadence1108
      @cadence1108 Před 5 lety

      thats why he named his own channel 'code' lol

  • @JoeAsaad
    @JoeAsaad Před 5 lety +1

    Thanking you is not enough. For the first time, I was able to understand loops and understand what they do. You are the best.

  • @Leo-jr5vk
    @Leo-jr5vk Před 2 lety

    its 2022 and i searched java loop explained
    its amazing that its still not outdated and java can still be used the same way...
    and thank you for explanation, it really makes me understand now

  • @chuckisrailov2773
    @chuckisrailov2773 Před 6 lety +1

    This video helped me a lot, thanks ! Whoever struggling with understanding of while loops just watch this video

  • @argjendsejfullai8304
    @argjendsejfullai8304 Před 3 lety +5

    Beautiful explanation , man we are really glad that someone is teaching us for free , and all we can give you is a subscribe , like , comment and a thank you

  • @sharanpreet5559
    @sharanpreet5559 Před 7 lety +3

    Explained with uttermost simplicity.

  • @solarwolfgaming3293
    @solarwolfgaming3293 Před 8 lety +6

    Wow I'm wanting to make a text adventure game for some friends and I've only been doing java for a few weeks in class and we haven't gone over this stuff yet and know I'll know all of it for when we do. Great tutorial!

  • @basilioreyes2434
    @basilioreyes2434 Před 3 lety +1

    what a helpful vid from 2014!!!! thank you i have finally solved my problem

  • @elicubillo313
    @elicubillo313 Před rokem +1

    ive been confused on loops for a while now and this helped out so much. thanks

  • @andreaaldrich4046
    @andreaaldrich4046 Před 7 lety +18

    I got a D on my first Java exam because I struggle with these loops (and I had a fever). I went from 98% to 84%.
    I'm feeling kind of gutted and wondering if I should quit. Watching everyone leave the room before me sucked.
    I should have watched these videos first.

  • @electric336
    @electric336 Před 8 lety +35

    This video helped a lot!! Thanks, dude!!

  • @mauromortier7808
    @mauromortier7808 Před 4 lety +3

    Came for the do while loop stayed for the whole video bcs damn that’s such a good explanation!

  • @kevinandgame4932
    @kevinandgame4932 Před 9 měsíci

    Yeah I am gonna say the same thing as the first comment. You are a million times better than my teacher. Thank you

  • @ulrichkruger
    @ulrichkruger Před 9 lety +38

    Here is a tip! type in 'sout' and hit tab! This will give you System.out.println();

    • @publicstaticvoid1
      @publicstaticvoid1 Před 8 lety +1

      +Julien Dhouti yes. use netbeans, its supported by oracle. and eclipse is durst

    • @-Idonotknow
      @-Idonotknow Před 6 lety +3

      For eclipse, type in sysout and press control+space. (This should work for both windows and mac, but im not sure because I use mac)

    • @seancoyle3132
      @seancoyle3132 Před 5 lety

      This right here!!!

    • @primalkong619
      @primalkong619 Před 5 lety

      its sout ctrl space

    • @iconiccalico1875
      @iconiccalico1875 Před 4 lety +1

      omg thank you lmao

  • @humphreychan6382
    @humphreychan6382 Před 6 lety +3

    you spend just 11 mins to cover the entire 50 mins lecture and actually make me understand what's going on while my 50mins lecture rises me more question marks in my brain

  • @Desiqnify
    @Desiqnify Před 7 lety +19

    Very straight to the point, thank you

  • @bhavanakprasad1415
    @bhavanakprasad1415 Před 8 lety +9

    its jst took minutes to understand... thanks for it

  • @zaheerimad5844
    @zaheerimad5844 Před 2 lety +1

    bro some next level teaching

  • @erikalmadrid4779
    @erikalmadrid4779 Před 2 lety +1

    My guy, let me just say you are amazing

  • @lifewithbreion1392
    @lifewithbreion1392 Před 7 lety +3

    GREAT instruction...you have an easy to understand voice and you explain with detail.subscribed👍

  • @regielmanaongsong144
    @regielmanaongsong144 Před 2 lety

    thank you for this Sir, I do understand you more than my teacher because he only reads our module but to you you explained it well and I love the quality of your voice. Very Helpful

  • @dontbemadsunshine
    @dontbemadsunshine Před 7 lety

    im at uni studying computer and network tech, im studying java for it and i have to say.. at first i hated it! but now ive started to learn more about it and be able to solve simple tasks, its such a great programming language!

  • @rendesal
    @rendesal Před 2 lety

    found this good analogy on reddit:
    A bully is trying to beat you up. You execute a for loop.
    for(energy = 5; energy--; you have energy left) { try to punch him }
    That means you could punch him 5 times.
    Now you execute a while loop.
    while(bully is standing) note that this is a boolean! { punch bully; }
    [bully is standing] could be true for 1, 10, 100 whatever punches. Its probably modified somewhere outside the loop.
    A slightly more useful example :
    Say you made a game. The game loop has to either be running, or paused. Using a for loop dosent make sense.
    for(i=0; i < 10000; i++) { draw game stuff;}
    Voila, your game abruptly ends after a few seconds.
    while(running == true) { draw game stuff;}
    Now it goes on till running is set to false.
    edit : you can also guarantee whether a block is ran.
    do while(boolean) { stuff; } block may or may not run at least once.
    do{stuff} while (boolean) block guaranteed to run at least once.

  • @tylerfromoklahoma
    @tylerfromoklahoma Před 6 lety

    Great video, I like that you provide examples after you make changes to the code. This helps a heap

  • @adindapujirahmawati1909
    @adindapujirahmawati1909 Před 5 lety +2

    This is very helpful, thank you very much. Now I get the better understanding about loop function.

  • @psyberfunk
    @psyberfunk Před 3 lety

    This helped me so much. You explain things much much clearer than my instructors. Thank you!

  • @rolandlundall133
    @rolandlundall133 Před 3 lety

    Thank you for your easy to understand explaination. I don't know why others don't explain things much easier.

  • @somosuddin5743
    @somosuddin5743 Před 5 lety +1

    Thank you. You made the loops very easy to understand.

  • @darkmenoxow7332
    @darkmenoxow7332 Před 5 lety +4

    Thanks, great video! Your explainations are easy to understand.

  • @MrDe-yz3ff
    @MrDe-yz3ff Před rokem

    Two birds by one stone
    1) learning English❤️
    2) learning java language ❤️

  • @deemuotori
    @deemuotori Před 5 lety +1

    this video saved me in computer class!!! thank you very much!!!

  • @braveknight283
    @braveknight283 Před 9 lety

    Great work. I have a Java final tomorrow and I am using your videos to review. Thank you for the help!

  • @Bob-wm6jn
    @Bob-wm6jn Před rokem

    0:26 While loop
    5:26 For Loop

  • @thetechmaster6510
    @thetechmaster6510 Před 4 lety

    Nice video, summed up everything my teacher taught me for 2 weeks in 10 min

  • @lorenportilhorampinelli1283
    @lorenportilhorampinelli1283 Před 6 měsíci

    Thank you for such a great job! The way you explained this made perfect sense!

  • @emzzz2370
    @emzzz2370 Před 8 měsíci

    Great video and explanation! I had some Java basics things mixed up, but now I have them all sorted out! Thank you!

  • @hprivij
    @hprivij Před 7 lety +2

    This vedio hepled me get the knack of it..pretty clear and good.

  • @divyanshswami4508
    @divyanshswami4508 Před 7 lety +1

    Excellent! this helped me a lot for my exam . Thank you very much.

    • @Dyar2
      @Dyar2 Před 5 lety

      Bhavna Swami me too

  • @benjamintoledo5043
    @benjamintoledo5043 Před 3 lety

    ive been struggling on how to read these loops thankx a lot man!!!!!

  • @jairmartinez4903
    @jairmartinez4903 Před 8 lety

    Outstanding tutorial , very easy to understand the content thanks to your examples and good way of explaining the loops

  • @theabhay04
    @theabhay04 Před 8 lety

    one of the best video .. brother u explained it in the best way ..just in 10 mins u taught me loops ..thanks brother

  • @intuitiveclass6401
    @intuitiveclass6401 Před 2 lety +1

    holy shit you made that a lot simpler to understand

  • @yt_bharat
    @yt_bharat Před 5 lety

    Excellent explanation. I ve now got the concept of control statements. Thanks

  • @SecureOpsWizard
    @SecureOpsWizard Před 7 lety +1

    Thank you Sir! Couldn't get any simpler.

  • @4nukeman2
    @4nukeman2 Před 5 lety +1

    Thanks, best explanation yet!

  • @tomiloreosikoya
    @tomiloreosikoya Před rokem

    Thank you so much, you just simplified it for me

  • @Prashant_Das
    @Prashant_Das Před 6 lety +1

    Thank you
    Perfect learning video

  • @Broadway1982
    @Broadway1982 Před 7 lety

    awesome!! Best break down on how loops work... Thanks!

  • @calistan5431
    @calistan5431 Před 5 lety

    Very well explanation, I was able to completely follow along with this vs the video on my online course. Thank you very much for this

  • @kirbthwomper219
    @kirbthwomper219 Před rokem

    Thank-you for explaining this in an easy to understand and concise manner! Will be checking out your other videos and subbing

  • @blenderremastered9959
    @blenderremastered9959 Před 5 lety

    i dont get the concept
    while(ture){
    Console.WriteLine(Hello);
    }
    What the expression you are checking for the true to be validated.

  • @sandisiwencube2909
    @sandisiwencube2909 Před 3 lety

    Thank you so much!
    Your explanation was straight forward and easy to follow.

  • @IndianSniper25
    @IndianSniper25 Před rokem

    Thank you for the simple explanation.

  • @lunarskyye2680
    @lunarskyye2680 Před 7 lety

    Quick & to the point. Thanks a million bro.

  • @thauhirbenjamin3648
    @thauhirbenjamin3648 Před 4 lety

    Such an amazing video. Explanation was nice, simple and easy to understand

  • @gusfalk
    @gusfalk Před rokem

    Can someone help me with this:
    Write a while-loop that prints x plus signs on the same line.
    public static void runLoop(int x){

    // complete the loop below
    while(){
    System.out.print();
    }
    }

  • @rainmomo3971
    @rainmomo3971 Před 7 lety +1

    Thank you for sharing !! excellent ! could u please explain if use boolean to control the loop ?

  • @abdel-ilahabdallah2012
    @abdel-ilahabdallah2012 Před 5 lety +1

    Papa bless you , good soul

  • @TheWboyy
    @TheWboyy Před 5 lety

    what if you want to run a menu where you ask the user to enter a choice 1-4? what should you write inside of the brackets after while(?) if I want it to run over and over again...without setting it to true?

  • @dzung8432
    @dzung8432 Před 7 lety

    hello! my question is if I can use loop for command live move(), turned(), turnright() in java so I can't have to repeat those code when I want to move an object. If yes then how should I put those code together. thanks.

  • @RemixPicture
    @RemixPicture Před 9 lety

    The final code:
    package tutorials;
    public class Main {
    public static void main(String[] args) {
    int a = 10;
    do {
    System.out.println("Hello world!");
    a++;
    } while (a < 10);
    // for (a = 0; a < 100; a += 2) {
    // System.out.println(a);
    // }
    // while(a < 100){
    // System.out.println(a);
    // a++;
    // }
    // System.out.println("Loop finished.");
    }
    }

  • @jsonzgaming5212
    @jsonzgaming5212 Před 4 lety

    Hello can you help me out how to use if condition like 0123456789 and the
    Output is
    123
    567
    89?
    Thank you much I really need it

  • @misbahelmiroj8896
    @misbahelmiroj8896 Před 7 lety +1

    The display in my netbeans is not the same as the one shown on your video, can I start my source code from a different line with your video view?

  • @garrettpoist3191
    @garrettpoist3191 Před 8 lety +1

    Thanks, helped me out a lot.

  • @JoshGiddeyEnjoyer157
    @JoshGiddeyEnjoyer157 Před rokem

    Which loop is the easiest?

  • @Desiqnify
    @Desiqnify Před 7 lety

    Hi i was wondering is it possible to have multiple condition within a for loop? I've tried using the && symbol to have 2 statements but i get an error

  • @ohmyboytroy
    @ohmyboytroy Před 4 lety

    How can I find a sum of the numbers that were input on to the screen while using a loop

  • @joeljacob4000
    @joeljacob4000 Před 5 lety +1

    Thank you this has helped me a lot

  • @jayveeempleo3731
    @jayveeempleo3731 Před 6 lety +1

    Wow. Keep uploading videos and you will assure my likes

  • @kaustubhgupta4619
    @kaustubhgupta4619 Před 5 lety

    Thanks a lot !!!!!!! if it weren't for you I would have flunked my java test

  • @imaginartist2139
    @imaginartist2139 Před 3 lety

    You think while() is a construstor?

  • @rimaborah5347
    @rimaborah5347 Před 5 lety

    But what are increment decrement statements

  • @dianabookmadness
    @dianabookmadness Před 2 lety +1

    Fantastic. thank you

  • @dabbagh6734
    @dabbagh6734 Před 5 lety +14

    Who else wrote a

  • @manuelvillegas9171
    @manuelvillegas9171 Před 5 lety

    Amazing. Straight to the point!

  • @kuyaj7469
    @kuyaj7469 Před 3 lety

    how about starting negative?

  • @songming2462
    @songming2462 Před 7 lety

    Thank you very much. You explain everything that i couldn't understand hahaha you have my gratitude

  • @Mosha1410
    @Mosha1410 Před 7 lety +1

    How do you stop that do loop?

  • @vacademata
    @vacademata Před 8 lety

    if my int a = 1 ...how can I fiind out witch numbers can be divided by 2 ? ...like in your exemple when
    for (int a = 1; a < 100; a++) ...

    • @hamadler
      @hamadler Před 8 lety

      The numbers that can be divided by 2 are called even numbers
      say u have a number in a variable called aVar, for that number to be even aVar%2 has to equal 0 , in other words if (aVar%2==0); that number can be divided by 2 and hence is an even number, Hope this helped

    • @vacademata
      @vacademata Před 8 lety

      It makes sens now...thank you

  • @daisyrani6021
    @daisyrani6021 Před 5 lety

    Thanks very useful for my exams.

  • @johnmark5819
    @johnmark5819 Před 4 lety

    how to loop to ascending?

  • @jeremyabogado9569
    @jeremyabogado9569 Před 4 lety

    thank you for this video. it's very cleared and detailed .

  • @yasminhusain3810
    @yasminhusain3810 Před 6 lety

    u r really good, thanks. fast and clear please make more videos

  • @khalilabdelkarim9058
    @khalilabdelkarim9058 Před 2 lety

    Well explained, Thank you!

  • @aldoorozco2047
    @aldoorozco2047 Před 5 lety +1

    great! thanks for your help!

  • @abedinist
    @abedinist Před 6 lety

    Can somebody give me advice on how to learn Java? Is the best way to follow online projects though CZcams videos? Following online course? I know someone is going to say to create small projects but what projects would you recommend?

  • @MasterGamer-uc2ns
    @MasterGamer-uc2ns Před 6 lety

    Omg I got 65/70 for my IP test omg thank youuuuu

  • @mohammedabahussain4562

    thank you very much, man. you have saved me.

  • @lawandadib1438
    @lawandadib1438 Před 4 lety

    thank you, you were very helpful

  • @evilevan9687
    @evilevan9687 Před 11 měsíci

    Welcome to the sick video!

  • @randylandry5332
    @randylandry5332 Před 8 lety

    Any loop written with a for statement can be written with a while statement? true or false

  • @Jad4life
    @Jad4life Před 2 lety

    great explanation mate!! keep up the good work

  • @davidelijahsackitey6193

    Please I need more loops and how to use the in a program

  • @badguy66626
    @badguy66626 Před 7 lety +1

    how do u do or?

  • @estevanwhite7593
    @estevanwhite7593 Před 4 lety

    Super helpful my guy. Keep it up 👍🏽

  • @balikeanna5382
    @balikeanna5382 Před 5 lety

    THANKS VERY MUCH