I'm doing a computer course and I'm struggling to wrap my head around programming...

I'm doing a computer course and I'm struggling to wrap my head around programming, it's all java for my first year and I can't fucking understand for loops, while loops indexes strings arrays objects shit is confusing. How do I better understand it?

Attached: 1615443449765.jpg (584x413, 115.63K)

Other urls found in this thread:

youtube.com/watch?v=3jMaKlNBjug
twitter.com/NSFWRedditImage

you are a retard
säge

>loops
someone post "her"

An array is a variable that stores values
A for loop can go through every array
For example
Var variable[0]="apple";
Var variable[1]="orange";
For i in variable
{
Console.log(variable[i])
}
Or something like that

there is no shame in getting filtered user
life filters everyone eventually

Attached: Screenshot (4).png (697x241, 28.96K)

I understand what they are but implementing them and making methods to mess with them and all that shit confuses me

just watch videos on youtube m8
bit weird to be filtered by that and at this stage but hey man, everyone's different
youtube.com/watch?v=3jMaKlNBjug
here's the first result i got after searching for java for loop (since i assume you don't understand how to use youtube's search function either)

Attached: 1647973868600.jpg (2289x1796, 341.51K)

Are for loops used for lots of things or is it just basic shit

Loops are confusing at first, after 2-3 days of practicing and thinking about logic behind them while eating your burger it will all make sense. Programming is nothing but loops, so once you get comfortable, its downhill.

>Programming is nothing but loops
Really? Thanks for the good news

A while loop is used most often when you know the termination condition, but not the number of loops. A for loop is used when you know the number of loops that need to be performed. A do-while loop is used when you want the code inside the loop to execute at least once.

stop adding "shit" on every sentences

Also if statements, though they arent as confusing (i hope, for you)

Is this terminology like for while do etc applicable just for java or every programming language?

Everything except brainfuck, I suppose.

By dropping the course and doing something that doesn't involve programming.

Oh you mean a function
Well for example you could do
Function word(a)
{
return a
}
Console.log(word(1))
And that would print 1

Sometimes you'll get different names for things or they look different but the underlying concepts are the same. Just focus on learning Java for now, don't worry about other stuff yet.

Thanks I'll do that

I don't get it, thats a correct for loop in C++

If I explain the joke, it won't be funny

But what does the i represent.