Question: what is the difference between for loop and enhanced for loop?
Answer: Difference between for loop and advanced for loop in Java 2) The enhanced for loop executes in sequence. i.e the counter is always increased by one, whereas in for loop you can change the step as per your wish e.g doing something like i=i+2; to loop every second element in an array or collection.