0
Can someone help better explain the for i statements it kind of confuses me
I need help
3 Respuestas
0
Post the specific code you're referring to
0
A standard for loop works like this
1. create a variable
2. define a condition
3. do something
4. increase or decrease the variable
5. check condition if true
repeat 3 - 5
Example for Java:
for(int i = 0; i < 10; i++) {
System.out.println("Counter: "+i);
}
Step 1: int i = 0;
Step 2: i < 10;
Step 4: i++
Step 3: System.out.println("Counter: "+i);
Step 5 works automatically
the best thing is if you try it by yourself
The Java Course for Example explains the for loop very well
https://www.sololearn.com/learn/Java/2147/?ref=app
0
thanks