Java Programming Tutorial - 31 - Enhanced for Loop

แชร์
ฝัง
  • เผยแพร่เมื่อ 3 ธ.ค. 2024
  • Source Code: github.com/the...
    Core Deployment Guide (AWS): docs.google.co...

ความคิดเห็น • 507

  • @KeshaLukin
    @KeshaLukin 8 ปีที่แล้ว +253

    For those who're struggling!
    It's easy to look at this type of loops as at the shopping list example.
    Let's say you have an array named string shoppingList[] = {eggs, milk, bread, tuna};
    Now when it comes to the loop, here's what you can do:
    for (string item: shoppingList) {
    System.out.println(item);
    }
    The output will be strings like this:
    eggs
    milk
    bread
    tuna
    Basically, it's an easy way to write a for loop but you don't have to specify the length of array and increment the counter because this loop takes this data from the array . And it's also a convenient way for naming an x in a descriptive way like "item" so you know what you're accessing.

    • @ElectricPyroclast
      @ElectricPyroclast 8 ปีที่แล้ว

      Can you help with using enhanced for loops when nested, like for 2D arrays? The best method I came up with so far is:
      int[][] nums = {{0,1,2,3}, {4,5,6,7}};
      for (int[] i : nums)
      {
      for (int j : i)
      {
      System.out.print( i[j] );
      }
      System.out.println();
      }
      The first row printed out fine as 0123, but I couldn't get to the second row, with the exception being thrown for j equalling 4 (therefore, i[4] does not exist).

    • @ArkhayaAratia1999
      @ArkhayaAratia1999 8 ปีที่แล้ว

      Your code is kind of wrong, you need to fix it to be able to fix the original problem

    • @KeshaLukin
      @KeshaLukin 8 ปีที่แล้ว +9

      thanks for heads up, but that was rude

    • @ianos123
      @ianos123 7 ปีที่แล้ว +3

      you have a little mistake it should be:
      String shoppingList[ ] = {"eggs", "milk", "bread", "tuna"}; :)

    • @KeshaLukin
      @KeshaLukin 7 ปีที่แล้ว +4

      god bless semicolon;

  • @rbflowin_TV
    @rbflowin_TV 10 ปีที่แล้ว +40

    The ones who are getting confused, total+=x ......is same as writing....
    total = total + x

  • @NehiThompson
    @NehiThompson 13 ปีที่แล้ว +1

    Does anyone else notice these videos were all uploaded on the same day? Dude is committed. I like it.

  • @jonn9302
    @jonn9302 11 ปีที่แล้ว +49

    This is also called a "Foreach loop" if you want to google this for more examples.

  • @thexxmaster
    @thexxmaster 9 ปีที่แล้ว +8

    So glad someone could explain this so simply, thanks a bunch

  • @akanshagoel1725
    @akanshagoel1725 9 ปีที่แล้ว +37

    For people having Syntax error, 'for each' statements are only available if source level is 1.5 or greater.
    if you are using Eclipse IDE then right click on the project, goto properties, Java Compiler, Check Enable project specific settings and set the Compiler compliance level to greater than 1.5. I solved this issue by setting it to 1.6. Hope it helps.!!

    • @zaidshaikh1227
      @zaidshaikh1227 9 ปีที่แล้ว

      +Akansha goel thanx buddy...it worked

    • @jason_rivera
      @jason_rivera 4 ปีที่แล้ว

      mine is 1.8 but I'm still getting a Syntax error... I am using a Macbook Pro 2013, not sure if that matters

    • @dishie7737
      @dishie7737 4 ปีที่แล้ว

      thx so much it workeddd

  • @TheSgDev
    @TheSgDev 10 ปีที่แล้ว +6

    Best java tutorial channel so far. Subscribed.

  • @alexthecreator8380
    @alexthecreator8380 2 ปีที่แล้ว

    lets all appreciate how bucky always give the best names to identifiers and variables

  • @Raress96
    @Raress96 13 ปีที่แล้ว

    man you convinced me that watching these tutorials wasn't a waste of time

  • @hillaryjude9154
    @hillaryjude9154 4 ปีที่แล้ว

    Even after 10 years of this video I still prefer @thenewboston. Explanations are crystal clear.

  • @sapphiresk1
    @sapphiresk1 10 ปีที่แล้ว

    That actually explains it very well. I'm pretty excited because these older tutorials are making more and more sense as I keep working on them.

  • @killianoshaughnessy1174
    @killianoshaughnessy1174 4 ปีที่แล้ว

    A video helping people, 11 years from the future, make sense of how the enhanced for loop works. Thanks!

  • @jeyagoni
    @jeyagoni 15 ปีที่แล้ว +1

    Tus tutoriales son excelentes, he empezado de cero y son fácil de entender, gracias por este gran aporte

  • @amrkalammansoori4411
    @amrkalammansoori4411 7 หลายเดือนก่อน

    Wonderfully explained how to run through the array and store each value in a variable and output the total.
    I am loving loops now.

  • @willfeav
    @willfeav 11 ปีที่แล้ว

    It's pretty useful to see how the various bits and pieces come together. You only really learn something like this by putting it to use in things.

  • @Rjsipad
    @Rjsipad 10 ปีที่แล้ว +116

    Thumbs up if you are learning this so that you can eventually make an awesome game!

    • @ron4212
      @ron4212 7 ปีที่แล้ว +7

      did you eventually make an awesome game? If you did, I doubt it was with Java

    • @CloroxBleach-fl8ky
      @CloroxBleach-fl8ky 7 ปีที่แล้ว +5

      no need to try and put bigbird down, plenty of decent games can be made in java, sure you cant make anything crazy but i doubt thats what he meant

    • @FirstNameLastName-tc2ok
      @FirstNameLastName-tc2ok 7 ปีที่แล้ว

      Luke Bends lol mine craft was made in java... js

    • @CloroxBleach-fl8ky
      @CloroxBleach-fl8ky 7 ปีที่แล้ว

      oh shit rlly didn't know, how cool but point still stands, java is awesome

    • @Toopa88
      @Toopa88 7 ปีที่แล้ว +1

      MC was made with Java but everyone would be happy if it wasn't cause C++ is more efficient when it comes to making video games.

  • @Quest777N
    @Quest777N 15 ปีที่แล้ว

    Your Java Tutorial is a life saver! Those boring school books.. Your videos is just the best!
    Keep up the good work!

  • @KCML036
    @KCML036 8 ปีที่แล้ว +4

    Got AP exam tomorrow, thx for the video! Nice and quick review

    • @Autocoder
      @Autocoder 8 ปีที่แล้ว +3

      I wish my school had that class. Hope you did good!

  • @FlashGordon1023
    @FlashGordon1023 11 ปีที่แล้ว +1

    My text book left me totally confused. Thanks for making this easy to understand.

  • @ash1987fly
    @ash1987fly 15 ปีที่แล้ว

    bucky u r really genius to make us explain all these things an that to so easily.

  • @eyadbassam7756
    @eyadbassam7756 8 ปีที่แล้ว +1

    Thank you for your tutorials , there is a shortcut for print method is { in main method put these letters [ syso ] after that hold [ctrl+space ] it will show you the print method just press it , my regards Eyad

  • @TheJillybooty
    @TheJillybooty 13 ปีที่แล้ว +7

    This is a lot easier in python.
    "one for loop to loop them all..."
    Well I guess "one does not simply walk into programming."

  • @ciarawn
    @ciarawn 11 ปีที่แล้ว

    It's very early in the morning for him, so presumably he uploaded it right after he made it and the server that this is on is in a different time zone in which it was before midnight. :)

  • @AlexCouch65
    @AlexCouch65 11 ปีที่แล้ว

    Not surprising, he is a Java God. He probably programmed a time machine so that he uploads it early!

  • @Rapidodalua2008
    @Rapidodalua2008 11 ปีที่แล้ว

    So your at Java Tutorial 31, and your coding has improved a lot!

  • @The7azem
    @The7azem 12 ปีที่แล้ว

    i dont find some one very kind like you everyday

  • @shakarwshyar2980
    @shakarwshyar2980 ปีที่แล้ว

    Old but getting Gold bro, well explained ❤❤

  • @dasten123
    @dasten123 13 ปีที่แล้ว +1

    this tutorial series is awesome! thank you dude

  • @L33tSauceProductions
    @L33tSauceProductions 10 ปีที่แล้ว +2

    Finally understood this, thank you!

  • @saneetkaul8150
    @saneetkaul8150 3 ปีที่แล้ว +1

    The only difference between enhanced for loop and for loop is that the enhanced for loop is inflexible compare to for loop. You can only iterate (repeat) increment in sequence in the enhanced for loop whereas you can iterate decremental or incremental in for loop without strictly following the sequence i.e. you can change it

  • @johnbuggins9424
    @johnbuggins9424 11 ปีที่แล้ว

    Good luck to all you other guys (and girls) who have made it this far. You're learning something genuinely useful!

  • @PrasinoXorton
    @PrasinoXorton 13 ปีที่แล้ว

    TO CLEAR IT OUT it is the same as this:
    for(int counter=0;counter

  • @arnavpvpkumar5591
    @arnavpvpkumar5591 5 ปีที่แล้ว

    With this lesson, I've created 2 different random number generators that add the sums of the numbers. One has a for loop that will repeat it's for loop code (with a incrementation) a random number of times, while the other uses an array with 4 random values added together. I'll share both of them for anyone who may want to use them to analyse the way the java randomiser functions (because I did see some odd similarities (for instance, the value 0 being repeated quite often compared to what you'd expect considering how low the probability of that occurring is because of all the possible values the randomiser can input)).
    The "completely" random code:
    import java.util.Random;
    public class RandomNumberGenerator
    {
    public static void main(String args[]){
    Random num1 = new Random ();
    Random num2 = new Random ();
    int add = 0;
    int somenum = num1.nextInt();
    for(int a = 1; a

  • @MrNafei
    @MrNafei 11 ปีที่แล้ว

    Believe it or not. You made my (and probably also others) day! Thanks for the smile. :-)

  • @colouredmirrorball
    @colouredmirrorball 13 ปีที่แล้ว

    Trivia:
    This enhanced for loop is also called the for each loop.
    You could also read "for(int x : bucky) {} " as "for each integer x in bucky..."

  • @borhanamini
    @borhanamini 7 ปีที่แล้ว +1

    for(int x: bucky) -> is equivalent to -> foreach(int x in bucky) in C# -> is equivalent to -> foreach($bucky as $x) in PHP

  • @kikiki358888
    @kikiki358888 14 ปีที่แล้ว

    Bucky your really good
    i bet you already know this but if you type "syso" and click ctrl space it will write System.out.println(); automatically for you :)
    continue making great vids

  • @WillStriveHarder
    @WillStriveHarder 15 ปีที่แล้ว

    dude.thanks for all your tutorials.. they're pretty useful to me! thanks a lot!!!

  • @MollsterJack
    @MollsterJack 11 ปีที่แล้ว

    Don't know if you've worked it out by now, but I think total+=x is short for total = total + x, so it takes the previous total and adds the current value of x. He's just saving space.

  • @Haidamuhammedbenali
    @Haidamuhammedbenali 11 ปีที่แล้ว

    Love your tutorials Bucky. You are the best!

  • @dalalalghomlas1600
    @dalalalghomlas1600 9 ปีที่แล้ว

    I see it like a shortcut for the regular for loop, Thanks bucky!

  • @MrKevMan
    @MrKevMan 12 ปีที่แล้ว

    I watched most of these 2x the first go round.
    Once i watched them all, following along in Eclipse, i started over again, but in stead of wiping the classes each time, i just create new methods and call them from apples.java.
    I comment out last tut's method calls and create a new one.
    For the array tuts, i have been using just one function and adding more and more methods to it.
    My apples class is about 386 lines right now with commenting and a few experiments of my own, as bucky encourages.

  • @joeymoto108
    @joeymoto108 12 ปีที่แล้ว

    Dude Bucky's subscribers could all make a website dedicated to reviewing Bucky's videos. It could be like an open wiki type of thing, with sections such as "How to make a Table of Arrays" and "How to make an infinite for loop". It'd help the people writing it up to remember everything, plus it'd benefit those who actually read the site.

  • @MrOwlTheHooter
    @MrOwlTheHooter 4 ปีที่แล้ว

    Easily and nicely explained; thank you.

  • @dutchprime1488
    @dutchprime1488 10 ปีที่แล้ว +14

    So enhanced for loops are for arrays?? Am i right?

    • @garmond401
      @garmond401 10 ปีที่แล้ว +6

      yes it is especially made for arrays. This can be called a "For Each" Loop, because it is looping in each and every array element.

    • @dutchprime1488
      @dutchprime1488 10 ปีที่แล้ว

      Thanks :-)

    • @Gunsong1
      @Gunsong1 10 ปีที่แล้ว +2

      if you can loop through it somehow, meaning it implements the Iterable interface. then you can use
      for([class] [instance name] : [Collection instance name])
      {
      }
      so its not made especially for arrays its made for any class that implements Iterable where T is any type.
      you can do this for arraylists as well.

    • @dalalalghomlas1600
      @dalalalghomlas1600 9 ปีที่แล้ว +1

      Not only array, also for LinkedList.

    • @dalalalghomlas1600
      @dalalalghomlas1600 9 ปีที่แล้ว +2

      Basically anything with storing list type!

  • @games.8781
    @games.8781 11 ปีที่แล้ว +10

    just 3 array tutorials to go

    • @Thingie5
      @Thingie5 11 ปีที่แล้ว +4

      But I love arrays! D:

  • @psi43
    @psi43 12 ปีที่แล้ว

    @TheSamLegacy The best way to do this is to write variations of whatever you have learned. Don't copy what he does 1 to 1, just try to make your own versions of whatever he's presenting. This will force you to apply what you have learned in slightly different scenarios, which will make it stick a lot better.

  • @darepsy
    @darepsy 13 ปีที่แล้ว

    Thank you Bucky, great tutorials, nice tempo...

  • @YoutubeCensorsYou
    @YoutubeCensorsYou 11 ปีที่แล้ว

    only Bucky can come up with something as creative as DOG WOOD.

  • @dtgonzalez1
    @dtgonzalez1 13 ปีที่แล้ว +2

    I understood this video easily thank you for these tutorials!

  • @subhash.cvellur
    @subhash.cvellur 9 ปีที่แล้ว

    Simple and well explained. Thank you!

  • @Dragnog100
    @Dragnog100 11 ปีที่แล้ว

    Its basically saying total = total + x. You want to add on the next number to whatever you have got so far instead of replacing total with the next number

  • @paoloberg70
    @paoloberg70 7 ปีที่แล้ว

    As usual, THANKS i am learning a lot :)

  • @housamabdelrahman1
    @housamabdelrahman1 12 ปีที่แล้ว

    mac's version of aero snap is called cinch if you wanna follow along on the apple side ;)

  • @lost_donkey9153
    @lost_donkey9153 7 ปีที่แล้ว

    For clarification, why can't we use the array name for "total" rather than the identifier "x", for example total+= . I know it will not work, but why is this? Is it due to the limitations of the array to work with only one job assignment (working as an array holder only and not an identifer)?

  • @blayke602
    @blayke602 8 ปีที่แล้ว

    Here's an example of a program using previous lessons and including up the current one .
    What I did is create 2 classes, the 1st class named : "forTesting" is used to get and show data from the 2nd class named "methodLists". The program gets an input from user upon how many numbers will he/she add, value of number for each array then sums it all up in the end.
    import java.util.Scanner;
    class forTesting {
    public static void main (String[] args)
    {
    int passValue=0;
    Scanner getDigit = new Scanner(System.in);
    System.out.print("How many numbers will you add?: ");
    passValue = getDigit.nextInt();
    methodLists obj1 = new methodLists();
    obj1.process(passValue);
    obj1.result();
    }
    }//End of 1st Class
    import java.util.Scanner;
    public class methodLists {
    int sum=0; //instance variable
    public void process(int value1)
    {
    int arrayThread[] = new int[value1];
    Scanner getData = new Scanner(System.in);
    //store data in the array
    for (int looper=0;looper

    • @iIO_OIi
      @iIO_OIi 8 ปีที่แล้ว

      Oh, Why thank you kind sir. (laughs in a polite sirly fashion)

  • @123422288
    @123422288 12 ปีที่แล้ว

    all the vedios are really helpfull......thanks to bucky.......

  • @Erin12341000
    @Erin12341000 13 ปีที่แล้ว

    THANKS FOR ALL YOUR VIDEOS!! You are a massive help thank you so much!! :D

  • @tpavel0
    @tpavel0 8 ปีที่แล้ว

    you know, been programing before in c# and c++ for a long time, tried to to transfer into java and it was never really my thing.now after a long break of programing at all. trying again and seriously this tutorial are so good !!! and the most important thing I really enjoy when ever u put a short cuts that I never knew exist like the \t , the if statement inside the printf and now this loop. I mean feels like I was taught programing by idiots in the past... anyway really like your videos. hope it will keep up till the end :)

    • @robertreimann1846
      @robertreimann1846 8 ปีที่แล้ว +1

      Did you finish it already?? :D

    • @robertreimann1846
      @robertreimann1846 8 ปีที่แล้ว +1

      Did you finish it already?? :D

    • @DamarZaky
      @DamarZaky 8 ปีที่แล้ว

      that's why you should learn c before c# or c++

  • @gentworm2377
    @gentworm2377 3 ปีที่แล้ว

    Beautiful, just beautiful

  • @alexr8864
    @alexr8864 8 ปีที่แล้ว

    Thank you very much for your explanations!

  • @dfsfklsj
    @dfsfklsj 12 ปีที่แล้ว

    You can take notes so that you can always go back and review. That is what I did :)

  • @kbswails88
    @kbswails88 11 ปีที่แล้ว

    Thanks for your time and help!

  • @veritech2012
    @veritech2012 15 ปีที่แล้ว

    keep up the good work bucky

  • @EpistemicPolymath
    @EpistemicPolymath 10 ปีที่แล้ว +6

    Weird how they never taught us this type of loop in school

    • @leejin321
      @leejin321 5 ปีที่แล้ว +1

      no time to teach in school. limited number of lessons to teach, so teachers can only teach important stuff

    • @cameronc7403
      @cameronc7403 5 ปีที่แล้ว +1

      They don't want us to become too powerful and overthrow them one day.

  • @FinalBossStarcraft
    @FinalBossStarcraft 12 ปีที่แล้ว

    @TheSamLegacy One thing i have been doing is keeping a note book for these tutorials. That way i follow along in eclipse during the video, and then afterwards redo it in pen on paper(with explanations of each thing). That has helped me tons to remember all of the info!

  • @daianabilbao4402
    @daianabilbao4402 6 ปีที่แล้ว

    Can you change the values of the elements of array bucky with a for each loop? What I am thinking is that to change the element values in an array then you need to refer to the element with it's index and it seems like that isn't possible with a for each loop? Since a for each loop doesn't use indexes. I am confused about this.

  • @GamerMike389
    @GamerMike389 8 ปีที่แล้ว

    What is the difference between the enhanced for in Java versus the ForEach in Powershell? Or am I just overthinking it and they're the same thing?

  • @nikoicardo9474
    @nikoicardo9474 12 ปีที่แล้ว

    thanks again man you make it so easy

  • @ghaithammar2008
    @ghaithammar2008 12 ปีที่แล้ว

    I understood it !! thanks for the video mate :) cheers !

  • @clydeabelanio1800
    @clydeabelanio1800 11 ปีที่แล้ว

    thank you for your tutorails . i learn a lot

  • @AnnoyedDragon
    @AnnoyedDragon 12 ปีที่แล้ว

    I'm confused.
    I can see the for loop is assigning bucky's values to x, plus the total is adding x to itself each loop. But what is controlling which of bucky's values are being added to x?
    The way I'd usually go about this would be to have a counter increasing each loop until a desired figure is reached, with bucky[counter] identifying which of bucky's values I want to access. Counter 0 accessing bucky 0 and then 1, 2, 3 etc.
    I don't see what is controlling this in this videos code.

  • @tboneaph2789
    @tboneaph2789 5 ปีที่แล้ว

    Thanks! This clarified things.

  • @DefinitelyNotAnth
    @DefinitelyNotAnth 12 ปีที่แล้ว

    Just in case anyone watching this tutorial is already proficient in other programming languages, this is the equivalent of a "for each" loop.

  • @VEGETADTX
    @VEGETADTX 12 ปีที่แล้ว

    Is there any difference in performance/speed between this type of for loop and the standard one?
    I am guessing that the difference is probably negligible if there is any at all, but hey...I'm just curious :)

  • @helaolange
    @helaolange 4 ปีที่แล้ว

    Did the array declaration changed?
    Is it the same to declare an array like
    ```int[] bucky = {}```

  • @ilgazkuscu5600
    @ilgazkuscu5600 7 ปีที่แล้ว

    If you need the sum of more than 1-dimensional arrays you will have have to type [] next to your variable.
    int matrice [] [] = {{1},{1,2}}; // We now have a 2 dimensional matrice called "matrice"
    //To get the sum of the elements:
    for(int y[]: matrice){
    for(int z:y){
    }
    }
    //Then you can print the sum on your main method

  • @prithvishan7403
    @prithvishan7403 4 ปีที่แล้ว

    thank you bucky ;) helped me a lottt

  • @majesticbarrack5506
    @majesticbarrack5506 8 ปีที่แล้ว

    what is counter in this loop? like i want to print out
    bucky 0 = 3
    bucky 1 = 4
    bucky 2 = 5
    bucky 3 = 6
    bucky 4 = 7
    how can i print out the value of the counter ? i knew it how to do with for loop but don't knew how to do this with Enhanced for loop

  • @rsencyclopedia
    @rsencyclopedia 9 ปีที่แล้ว +11

    Tried incorporating all the tuts into a simple game
    class with the functionsimport java.util.*;
    public class recap2 {
    public void guess() {
    Random dice = new Random();
    Scanner input = new Scanner(System.in);
    for ( int i = 0; i < 1000; i++) {
    int head[] = new int[10];
    int A = 0;
    System.out.println("Guess how many times it will land on heads out of 10");
    int am = input.nextInt();
    if ( am

    • @ilmillion
      @ilmillion 9 ปีที่แล้ว +6

      ***** I liked it, why diss him.

    • @nickmeins3397
      @nickmeins3397 9 ปีที่แล้ว +4

      OriginalClassTV Because he's angry that he doesn't understand the code. Otherwise he would be a helpful human being by giving some tips/tricks or even new ideas.

    • @amikawi
      @amikawi 9 ปีที่แล้ว +3

      Brett Morris
      TLDR: I spent over an hour looking at the dice game because the way you did it confused me. But still NICE!
      This doesn't exactly simulate flipping a coin, because tails will always be atleast 1. It's a very very nice implementaion of most of what was learned don't get me wrong! But when a number is added to the value of an index if that index has already been run through by the for loop then the value of x will not change. Basically you're generating a number between 1 and 10 in an EXTREMELY complicated way (not 0 mind you which would be possible when flipping a coin) and subtracting it from the number of flips.
      This is a simluation broken down step by step
      At the beginning of index 0 a = 0 and x = 0
      At the end of index 0 a = 0 and x = 0
      At the beginning of index 1 a = 0 and x = 0
      At the end of index 1 a = 0 and x = 0
      At the beginning of index 2 a = 0 and x = 0
      At the end of index 2 a = 0 and x = 0
      At the beginning of index 3 a = 0 and x = 0
      At the end of index 3 a = 0 and x = 0
      At the beginning of index 4 a = 0 and x = 0
      At the end of index 4 a = 0 and x = 0
      At the beginning of index 5 a = 0 and x = 2
      At the end of index 5 a = 2 and x = 2
      At the beginning of index 6 a = 2 and x = 0
      At the end of index 6 a = 2 and x = 0
      At the beginning of index 7 a = 2 and x = 0
      At the end of index 7 a = 2 and x = 0
      At the beginning of index 8 a = 2 and x = 1
      At the end of index 8 a = 3 and x = 1
      At the beginning of index 9 a = 3 and x = 3
      At the end of index 9 a = 6 and x = 3
      -------------------------------------
      Heads tails
      6 4
      It landed on heads 6 times
      -------------------------------------
      Index 0- Value 0
      Index 1- Value 1
      Index 2- Value 0
      Index 3- Value 0
      Index 4- Value 1
      Index 5- Value 3
      Index 6- Value 1
      Index 7- Value 0
      Index 8- Value 1
      Index 9- Value 3

  • @sachinarora7994
    @sachinarora7994 9 ปีที่แล้ว

    how can i fix tht problam
    Syntax error, 'for each' statements are only available if source level is 1.5 or greater

  • @epicnessism101
    @epicnessism101 11 ปีที่แล้ว

    i love he had to think about which number this was, "hi and welcome to uh..lets see...31st tutorial"
    0:03

  • @leonidas14775
    @leonidas14775 10 ปีที่แล้ว +11

    I think this is "for x in bucky" in python.

  • @XiaoYueLynn
    @XiaoYueLynn 12 ปีที่แล้ว

    @thenewboston Thanks for that trivia but is this limited only to one dimensional array?

  • @fivestargaming7770
    @fivestargaming7770 5 ปีที่แล้ว

    for everybody's kind information , it's called a FOREACH Loop

  • @ThePhan7em
    @ThePhan7em 12 ปีที่แล้ว

    Try adding two thing you learned in one, that what i do to help remember things, also try redoing what bucky teaches on his videos without looking back at the video, only when your done, finally just re-watch the videos that are the hardest to understand. Hope that helps

  • @ratedrr_chelsea2074
    @ratedrr_chelsea2074 8 ปีที่แล้ว

    i designed a factorial program thanks to your vid! ik the time complexity aint the best...but whatever #stilllearning :D
    Scanner s=new Scanner(System.in);
    System.out.println("Enter which number's factorial you which to find out:");
    int n=s.nextInt();
    int fact=1;
    int a[]=new int[n];
    for(int i=0;i

  • @2005jimmyguang
    @2005jimmyguang 10 ปีที่แล้ว

    a very interesting construct!

  • @凛-r3h
    @凛-r3h 5 ปีที่แล้ว

    I wish you provided sample questions that may use this array loop at end of video or in description or something

  • @DJCronxx
    @DJCronxx 13 ปีที่แล้ว

    to everyone who wants to write minecraft plugins for bukkit etc.
    I wrote since now 5 plugins, they are even accepted on bukkit dev.
    -AntiEnderPick
    -Enlete
    -LastChance
    And all that only from tutorials to 20!

  • @staffy35
    @staffy35 7 ปีที่แล้ว +3

    An array called dogwood?

  • @Skandalos
    @Skandalos 6 ปีที่แล้ว

    Can you rely on some order in which these iterations are processed?

  • @sharqKisame
    @sharqKisame 12 ปีที่แล้ว

    Know a lot you do. your master, is who I wonder.

  • @KaiserKaizen
    @KaiserKaizen 15 ปีที่แล้ว

    i think there is a bit of problem on this video. i don't know if it's just me, but it seems that this video buffer only until around 0:40.. i hope this got fix asap coz i can't understand the next tutorial, i mean this tut is used there right?
    by the way great tutorials you got there, i've just finished c++ and it really do help. thanks!

  • @COD5252
    @COD5252 13 ปีที่แล้ว

    morning wood sounds practical

  • @ircykk
    @ircykk 13 ปีที่แล้ว

    Great tutotial! :)

  • @UNUNUN11
    @UNUNUN11 15 ปีที่แล้ว

    thanks , I have just learn new easy way to sum up array elements

  • @EddieKMusic
    @EddieKMusic 12 ปีที่แล้ว

    @TheSamLegacy
    Buy a Java book from amazon or ebay.
    Best way of learning programming. It contains exercises, better explanation.
    For me those little videos are just basic stuff. He doesn't really explain how compiler works. And what everything REALLY does. He's like: "You don't need to know that"
    We need to know EVERYTHING about language we will use for our projects

  • @jarjar561
    @jarjar561 10 ปีที่แล้ว

    Was Syso Ctrl + Space not available when Bucky was making these tutorials?

  • @yosafatc.saputra5844
    @yosafatc.saputra5844 7 ปีที่แล้ว

    Thank you, this helps a lot