Java Programming Tutorial – 32 – Arrays in Methods

[ad_1]
Facebook –
GitHub –
Google+ –
LinkedIn –
reddit –
Support –
thenewboston –
Twitter –


Posted

in

by

Tags:

Comments

20 responses to “Java Programming Tutorial – 32 – Arrays in Methods”

  1. ancrcake Avatar

    So what I'm guessing happened is that when, in the main method, he wrote change(bucky); it replaced the parameter in 'public static void change(int x[])' with bucky in the parameter position instead and then ran the rest of the method. This would mean that it alters the array bucky and not the array x.

    I'm not completely confident with this so if anyone could confirm, that would be great

  2. Izran Shaikh Avatar

    who are those idiots who dislikes bucky's tutorials. yeah it can be suited to dislike those videos which that alex or whatever who made php tutorials but who are those fools who dislike tutorials of programming language and specially when it's of bucky itself.

  3. Melody Avatar

    i love how short these tutorials are, i have my final in compsci tmr and i just have been a mess with arrays

  4. Felipe Reyes Avatar

    This made a lot of sense. Thanks!

  5. Bilal Ahmed Avatar

    public static void main (String[] args) {
    int Array []= {1,2,3,4,5};
    MyChange(Array);
    for(int x :Array) {
    System.out.println(x);
    }
    }
    public static void MyChange(int r[]) {
    for(int tally =0 ; tally<r.length;tally+=1) {
    r[tally] += 5;

  6. Patrascu Lucian Avatar

    class learn {
    public static void main(String[] args) {
    String array[] = {"Cloud","Phone","Table"};
    plural(array);
    }
    public static void plural(String StoreArray[]) {
    for(String StoreString: StoreArray)
    System.out.println(StoreString+"s");
    }
    }

  7. Bojil Ivanov Avatar

    I am wondering how the array 'bucky' is changed once its passed into the method. The method 'change' doesnt return a value, so how can bucky get 5 added??

  8. Anti - Matter Avatar

    what does y:bucky do ?

  9. ToFu Avatar

    Anyone else who used arrays in methods in his previous tutorials already because they wanted to use them in parameters?

  10. Hamza Rana Avatar

    This tutorial is making me give up on Java 🙁

  11. Safae Mrabet Avatar

    what'is it bucky i don't indestand why and why his fonction because i found it all tuto

  12. Anand Farathabad Avatar

    Bro in that for loop x.length is not specified so how many times for loop will run??

  13. David Hsu Avatar

    there is so many episodes im afraid i will forget some of the lessons

  14. Cracked DERP Avatar

    What is the point of making a new variable, y? When you can just put x instead of y and get the same answer?

  15. Poya Ghahremani Avatar

    My question is, how should I "play around" with something like this?? xd

  16. everyday Avatar

    why can't i do "for(int counter:x.length;)" this, instead of "for(int counter=0;counter<x.length;counter++)"?

  17. Justin Morgan Avatar

    how do you pass a double ? instead of using int, I want to make an array of double values and pass to a method…end goal is to have a method from a double array

  18. Danny Semakov Avatar

    For the second method, could he not have written :

    for (int counter:x)
    x[counter]+=5

    Thanks in advance

  19. Dakota Lance Avatar

    Why is your output line by line and mine looks like this : 89101112

  20. Ravindra Shekhawat Avatar

    can someone explain how it change without returning value from method????

Leave a Reply

Your email address will not be published. Required fields are marked *