I'm having trouble understanding a concept in a do-while loop

OK I understand what's going on, first I'll format your code a little better:

package example;

public class Help3{
    public static void main(String args[]) throws java.io.IOException{
        char input, ignore;

        for (;;){
            System.out.println("Help on:");
            System.out.println("\t1. if");
            System.out.println("\t2. switch");
            System.out.println("\t3. for");
            System.out.println("\t4. while");
            System.out.println("\t5. do-while");
            System.out.println("\t6. break");
            System.out.println("\t7. continue");
            System.out.println("\nChoose one (q to quit):");

            input = (char) System.in.read();
            System.out.println("Input = " + input);
            do{ // confused
                ignore = (char) System.in.read(); // confused
                System.out.println("C = " + ignore);
            }
            while (ignore != '\n'); // confused

            if (input == 'q') {
                break;
            }

            do{
                switch (input){

                    case '1':
                        System.out.println("if(condition);\nelse(condition);");
                        break;
                    case '2':
                        System.out.println("switch(expression)\ncasenumber: (statement); break;");
                        break;
                    case '3':
                        System.out.println("for(initiation;condition;iteration)");
                        break;
                    case '4':
                        System.out.println("while(condition)");
                        break;
                    case '5':
                        System.out.println("do(expression){\n}while(condition)");
                        break;
                    case '6':
                        System.out.println("break; or break label;");
                        break;
                    case '7':
                        System.out.println("continue; or continue label;");
                        break;
                }

            }
            while (input < 1 | 5 > input);
            System.out.println();
            System.out.println("Thank you for using the program!\n");
        }
    }
}

Now the first thing I don't understand is what the for (;;){ on line 8 does. If you're supposed to have the below code run forever until canceled when a while-do or do-while loop should be used like you use from line 35 to line 69.

Now for your main question: what does

/r/javahelp Thread