Home / Programming MCQs / JAVA MCQs / Question
D
Q. What is the output of the following code?
int x = 0; do { System.out.println(x); x++; } while (x < 5);
The do-while loop prints the value of x on each iteration until x becomes greater than or equal to 5.
You must be Logged in to update hint/solution
Operator use to allocates memory to array variable in java?
What is the prefix used to represent Binary literals in Java?
The Comparator interface contains the method?
Which of this interface must contain a unique element?
Can the Java program accept input from the command line?
Which of these classes are the direct subclasses of the Throwable class?
Swing is not a part of JFC (Java Foundation Classes) that is used to create GUI application?
Discusssion
Login to discuss.