Question 15


What will happen when you invoke the following method? 1: void infiniteLoop() 2: { 3: byte b = 1; 4: 5: while ( ++b > 0 ) 6: ; 7: System.out.println("Welcome to Java"); 8: } A) The loop never ends(infiniteLoop). B) Prints "Welcome to Java". C) Compilation error at line 5. ++ operator should not be used for byte type variables. D) Prints nothing.