Java Programming Tutorial – 29 – Summing Elements of Arrays

///Java Programming Tutorial – 29 – Summing Elements of Arrays

Java Programming Tutorial – 29 – Summing Elements of Arrays

FavoriteLoadingAdd to favorites

Website –
GitHub –
Reddit –
Twitter –
Facebook –
LinkedIn –
Instagram –

source

Java468x60
By |2020-09-18T09:28:43+00:00September 18th, 2020|Java Video Tutorials|22 Comments

22 Comments

  1. tapesh vashisth September 18, 2020 at 9:28 am - Reply

    Cake walk for me

  2. Coleté DRC September 18, 2020 at 9:28 am - Reply

    Brooo before I even watch this video. A 4min Array explanation video! This is amazing man. I reason I fuk w your channel.

  3. TheDavidTeam September 18, 2020 at 9:28 am - Reply

    "theze"

  4. The Meme Council September 18, 2020 at 9:28 am - Reply

    if you wanna enter Passione, you gotta be 17!

    public class basicClass {

    public static void main(String[] args) {

    int passione[]={15, 15, 16, 17, 18, 20, 21};

    int ageTotal = 0;

    int averageAge;

    for(int counter=0; counter<passione.length; counter++) {

    ageTotal += passione[counter];

    averageAge = ageTotal / passione.length;

    System.out.println("The average age of Passione is: " + averageAge);

    }

    }

    }
    Console: The average age of Passione is: 17

  5. Gazzola September 18, 2020 at 9:28 am - Reply

    Today you can use
    int sum = IntStream.of(array).sum();

  6. Nirman Jackman September 18, 2020 at 9:28 am - Reply

    I watch his videos in 1.5x speed. So didnt notice he sounded tired. I understood everything.

  7. Mad September 18, 2020 at 9:28 am - Reply

    Are you programmer this day guys?

  8. Karam Chaban September 18, 2020 at 9:28 am - Reply

    Hey Bucky, I'm going through your java tutorials and I have a few questions about creating a method that dictates your array size and then another method to initialize that same array.

  9. selective eagle September 18, 2020 at 9:28 am - Reply

    How to find two elements whose total is 37? num1+num2=37, so how to find num1 and num2 here?

  10. One Of A Nice Kind September 18, 2020 at 9:28 am - Reply

    You can also multiply elements of arrays. I used the same array you used but with a product instead of a sum:

    class bananas{
    public static void main(String args[]) {
    int xxxx[] = {21, 16, 86, 21, 3};
    int product = 1;

    for (int counter = 0; counter < xxxx.length; counter++) {
    product *= xxxx[counter];
    }
    System.out.println("The product of these numbers is " + product);
    }
    }

  11. Rhod Nill September 18, 2020 at 9:28 am - Reply

    you can make strings right?

  12. Binafsha AR September 18, 2020 at 9:28 am - Reply

    can we be friends tho ahaha

  13. Adeel Nissar September 18, 2020 at 9:28 am - Reply
  14. Limmeh September 18, 2020 at 9:28 am - Reply

    Having to dance with the Fibonacci sequence for a problem.. thanks!

  15. mas bro September 18, 2020 at 9:28 am - Reply

    i'm having problem now, sum of arrays of floating point numbers.. that the array float come from results LatLng distance,, please make tutorial

  16. Patrick Kamdem September 18, 2020 at 9:28 am - Reply

    God bless you. you are a genius by God grace

  17. Nicholas Pitti September 18, 2020 at 9:28 am - Reply

    Put the video on x2 speed, then go to 0:20 when he says: "im gonna name my array b-" skip 10 seconds ahead with "l-key" on your keyboard. He says im gonna name mine black people.

  18. Shay Axelrod September 18, 2020 at 9:28 am - Reply

    A more advanced way would have been:

    main….{
    int bucky[] = {21,16,86,21,3};
    int sum = 0;
    for(int num : bucky) {
    sum += num;
    }
    }

  19. Lance Rose September 18, 2020 at 9:28 am - Reply

    wha about user input?

  20. Dawson Field September 18, 2020 at 9:28 am - Reply

    i am doing this exact thing but it says that += is undefined for the int,int[] argument

  21. Jan Šebek September 18, 2020 at 9:28 am - Reply

    anybody know i n which episode is that += trick explained? i understand what is going on, i just need clear explanation of that again and see if i havent missed anything

  22. Hea Mees September 18, 2020 at 9:28 am - Reply

    Way shorter and easier for loop imo

    int sum = 0;
    int numberArray[] = {3, 4, 6, 1 ,10};
    for (int num : numberArray) {
    sum += num;
    }

Leave A Comment

*