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.
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.
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
Cake walk for me
Brooo before I even watch this video. A 4min Array explanation video! This is amazing man. I reason I fuk w your channel.
"theze"
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
Today you can use
int sum = IntStream.of(array).sum();
I watch his videos in 1.5x speed. So didnt notice he sounded tired. I understood everything.
Are you programmer this day guys?
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.
How to find two elements whose total is 37? num1+num2=37, so how to find num1 and num2 here?
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);
}
}
you can make strings right?
can we be friends tho ahaha
2:33
Having to dance with the Fibonacci sequence for a problem.. thanks!
i'm having problem now, sum of arrays of floating point numbers.. that the array float come from results LatLng distance,, please make tutorial
God bless you. you are a genius by God grace
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.
A more advanced way would have been:
main….{
int bucky[] = {21,16,86,21,3};
int sum = 0;
for(int num : bucky) {
sum += num;
}
}
wha about user input?
i am doing this exact thing but it says that += is undefined for the int,int[] argument
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
Way shorter and easier for loop imo
int sum = 0;
int numberArray[] = {3, 4, 6, 1 ,10};
for (int num : numberArray) {
sum += num;
}