General statistics
List of Youtube channels
Youtube commenter search
Distinguished comments
About
Me, Myself and I
Fireship
comments
Comments by "Me, Myself and I" (@me-myself-i787) on "Java in 100 Seconds" video.
@prarthanashah3145 For loops are easy! ``` for(piece of code executed at start, condition for ending the loop, piece of code executed every time the loop repeats) { Code you want to put in the loop } For example: for(int iteration = 0, iteration < 5, iteration++) { println("Hello world!") } This piece of code will write "Hello world!" in the console 5 times, on a new line each time. And a nested loop is basically a loop inside another loop. For example: while(true) { for(iteration = 0, iteration < 7, iteration++) { doSomething(); } doSomethingElse(); } Every time this while loop runs through, it will doSomething() 7 times and then doSomethingElse () once.
1