Perform automated and live-interactive testing on 3000+ real desktop and mobile devices online.
A for loop is a type of control flow statement that specifies iteration. It runs a block of code or statements repeatedly until a particular condition has been satisfied.
Syntax
for(initialization; condition; increment/decrement){
//code or statement to be executed
}
Code Example
The below Java program demonstrates the working of for loop and prints table of 1.
public class ForLoopEx {
public static void main(String[] args) {
for(int i=1;i<=10;i++){
System.out.println(i);
}
}
}
Test your websites, web-apps, or mobile apps seamlessly with LambdaTest.
Start Free TestingEarn resume-worthy Selenium certifications that help you land a top job.
Learn MoreTest orchestration and execution cloud of 3000+ browsers and OS
24/7 support
Enterprise grade security
Fastest test execution cloud