Q. What is the main difference between a WHILE and a DO-WHILE loop in Java?

  • (A) WHILE loop executes the statements inside of it at least once even if the condition is false.
  • (B) DO-WHILE loop executes the statements inside of it at least once even if the condition is false.
  • (C) WHILE loop is fast.
  • (D) DO-WHILE loop is fast.
πŸ’¬ Discuss
βœ… Correct Answer: (B) DO-WHILE loop executes the statements inside of it at least once even if the condition is false.

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
274
Total Visits
πŸ“½οΈ
4 y ago
Published
πŸŽ–οΈ
Ram Sharma
Publisher
πŸ“ˆ
89%
Success Rate