Deloitte Interview Question

Please write a java code using a for loop.