// Program to print a text 5 times class Main { public static void main(String[] args) { int n = 5; // for loop for (int i = 1; i <= n; ++i) { System.out.println("Java is fun"); } } }