Java Programming Tutorial 47 - for Loops with Lists & How to Modify Each Element

preview_player
Показать описание


~~~~~~~~~~~~~~~ CONNECT ~~~~~~~~~~~~~~~

~~~~~~~~~~~~~~ SUPPORT ME ~~~~~~~~~~~~~~

🅑 Bitcoin - 3HnF1SWTzo1dCU7RwFLhgk7SYiVfV37Pbq
🅔 Eth - 0x350139af84b60d075a3a0379716040b63f6D3853
Рекомендации по теме
Комментарии
Автор

I’ve been cranking through your videos. I just an intro to java class and this has been super helpful!

zebuluncovert
Автор

I don't see how this is better than the simplified way you showed us in the earlier vids. I also still don't see how any of this helps us create modern applications yet. hoping this gets explained in later vids while I crunch through these cause I'm still learning more than I probably would in college, and I'm certainly learning this stuff far faster than I would in college.

ShawnJeezie
Автор

"Today in our C# programming series we are talking about", in the desc

ya-...
Автор

hey Caleb, why can't i use the add option here to extend the list?

binoyperies
Автор

hey Caleb, I just put the following 2 lines and get the same result, what's the difference?? If there is a difference, can you tell me what is it???

Input Code :
List<Integer>grades= Arrays.asList(5, 3, 2, 6, 3);
System.out.println(grades);

Terminal :
[5, 3, 2, 6, 3]

rittenbrake
Автор

Scanner input = new Scanner(System.in);
List<Integer>num=Arrays.asList(3, 5, 4);
for(int i=0;i<num.size();i++)
{
System.out.println("["+i+"] "+"Before Modifing : "+num.get(i));
int en=input.nextInt();
num.set(i, en);
System.out.println("["+i+"] "+"After Modifing : "+num.get(i));
System.out.println();
}

zerious-san
Автор

Caleb can you make a tutorial series for spring framework

evelynsummer
Автор

hey what's up stranger, i have a question when i use length instead of size it give me error i don't know why

tontuwala
Автор

What is wrong with this code?
I want to change the list so that it will have the numbers (4, 3, 2, 1) in the end but for some reason it outputs 4, 3, 3, 4 and I can't figure out why it isn't working. Here's the code:


import java.util.*;

class Hello {
public static void main (String[] args) {
List<Integer> strList = Arrays.asList(1, 2, 3, 4);
int i;

for(i = 0; i < strList.size(); i++) {
strList.set(i, strList.get(strList.size() - (1 + i)));

}
System.out.println(strList);
}
}

/* Outputs:
* 4
* 3
* 3
* 4
* [4, 3, 3, 4]
*/

ya-...