0

Can someone help better explain the for i statements it kind of confuses me

I need help

9th Oct 2019, 9:14 PM
Ethan
Ethan - avatar
3 Answers
0
Post the specific code you're referring to
9th Oct 2019, 9:25 PM
Odyel
Odyel - avatar
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
9th Oct 2019, 10:34 PM
Stefanoo
Stefanoo - avatar
0
thanks
9th Oct 2019, 10:38 PM
Ethan
Ethan - avatar