[ad_1]
Facebook –
GitHub –
Google+ –
LinkedIn –
reddit –
Support –
thenewboston –
Twitter –
Java Programming Tutorial – 32 – Arrays in Methods
by
Tags:
Comments
20 responses to “Java Programming Tutorial – 32 – Arrays in Methods”
-
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
-
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.
-
i love how short these tutorials are, i have my final in compsci tmr and i just have been a mess with arrays
-
This made a lot of sense. Thanks!
-
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; -
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");
}
} -
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??
-
what does y:bucky do ?
-
Anyone else who used arrays in methods in his previous tutorials already because they wanted to use them in parameters?
-
This tutorial is making me give up on Java 🙁
-
what'is it bucky i don't indestand why and why his fonction because i found it all tuto
-
Bro in that for loop x.length is not specified so how many times for loop will run??
-
there is so many episodes im afraid i will forget some of the lessons
-
What is the point of making a new variable, y? When you can just put x instead of y and get the same answer?
-
My question is, how should I "play around" with something like this?? xd
-
why can't i do "for(int counter:x.length;)" this, instead of "for(int counter=0;counter<x.length;counter++)"?
-
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
-
For the second method, could he not have written :
for (int counter:x)
x[counter]+=5Thanks in advance
-
Why is your output line by line and mine looks like this : 89101112
-
can someone explain how it change without returning value from method????
Leave a Reply