19 February 2014

Demonstration of Continue statement

Create a new class with name ControlContinue:

class ControlContinue {
    public static void main(String args[]) {
        //boolean bool = true;
        for (int i = 0; i < 5; i++) {
            for (int j = 0; j < 10; j++) {
                System.out.print(j + "\t");
                if (j > 5) {
                    System.out.println();
                    continue;
                }
            }
            System.out.println("Outer Loop");
        }
        System.out.println("End");
    }
}

Output:(Click on the image to enlarge)
Demonstration of Continue statement-output

Contact Form

Name

Email *

Message *

Smooth Graphics Java

// Arrange Bricks in Game //java brick breaker game code without flickering // added game levels 1,2,3 in the game //java paddle ball ga...