import java.lang.*;
public class FunctionDelays {
    FunctionDelays() {
        // do nothing
    }
    void functiondelay() {

        System.out.println("function1 exited. \n");
    }

    void functiondelay2() {
        // adding time delays
        for(int i=0; i<10; i++) {
            System.out.println("Loading...\n");
            try {
                Thread.sleep(600);
            } catch (InterruptedException ie) {
                System.out.println(ie.getMessage());
            }
        }
        System.out.println("function2 exited in 10 seconds. \n");
    }

    void functiondelay3() {
        // adding time delays
        for(int i=0; i<10; i++) {
            System.out.println("Loading...\n");
            try {
                Thread.sleep(600);
            } catch (InterruptedException ie) {
                System.out.println(ie.getMessage());
            }
        }
        System.out.println("function3 exited in 10 seconds. \n");
    }

    void functiondelay4() {
        // adding time delays
        for(int i=0; i<10; i++) {
            System.out.println("Loading...\n");
            try {
                Thread.sleep(600);
            } catch (InterruptedException ie) {
                System.out.println(ie.getMessage());
            }
        }
        System.out.println("function4 exited in 10 seconds. \n");
    }

    void functiondelay5() {
        // adding time delays
        for(int i=0; i<10; i++) {
            System.out.println("Loading...\n");
            try {
                Thread.sleep(600);
            } catch (InterruptedException ie) {
                System.out.println(ie.getMessage());
            }
        }

        System.out.println("function5 exited in 10 seconds. \n");
    }

    public static void main(String[] args) {
        FunctionDelays f = new FunctionDelays();
        f.functiondelay();
        f.functiondelay2();
        f.functiondelay3();
        f.functiondelay4();
        f.functiondelay5();
    }
}

// Submitted by Aswini.S
@@ -121,16 +121,312 @@
 lay() %7B%0A
+        // adding time delays%0A        for(int i=0; i%3C10; i++) %7B%0A            System.out.println(%22Starts Loading...%5Cn%22);%0A            try %7B%0A                Thread.sleep(600);%0A            %7D catch (InterruptedException ie) %7B%0A                System.out.println(ie.getMessage());%0A            %7D%0A        %7D
 %0A       
@@ -462,16 +462,30 @@
 1 exited
+ in 10 seconds
 . %5Cn%22);%0A
@@ -849,33 +849,33 @@
 tion2 exited in 
-1
+2
 0 seconds. %5Cn%22);
@@ -1240,33 +1240,33 @@
 tion3 exited in 
-1
+3
 0 seconds. %5Cn%22);
@@ -1631,33 +1631,33 @@
 tion4 exited in 
-1
+4
 0 seconds. %5Cn%22);
@@ -2023,33 +2023,33 @@
 tion5 exited in 
-1
+5
 0 seconds. %5Cn%22);

update code