πŸ“Š JAVA
Q. What is the output of the following program?
class Example {
public static void main(String args[]) {
int j;
do {
j++;
} while (j < 0);
System.out.println(j);
}
}
  • (A) The program does not compile as j is not initialized.
  • (B) The program compiles but does not run.
  • (C) The program compiles and runs but does not print anything.
  • (D) The program prints 0.
πŸ’¬ Discuss
βœ… Correct Answer: (A) The program does not compile as j is not initialized.

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
159
Total Visits
πŸ“½οΈ
2 y ago
Published
πŸŽ–οΈ
Mr. Dubey
Publisher
πŸ“ˆ
88%
Success Rate