Capgemini interview question

Explain a Java program using loop