Ask Question
28 July, 18:14

In Java, it is possible to create an infinite loop out of while and do loops, but not for-loops. true or false

+5
Answers (1)
  1. 28 July, 19:39
    0
    False is the correct answer for the above question.

    Explanation:

    In java programming language or any other programming language, any loop can be infinite. It is because the infinite loop is called for that loop which is not run in a finite number of times. The loop is used to repeat some lines in a finite number of times. Any loop has three things - first is the initial value which tells the loop to start, The second is the condition check which states when the loop will stop and the third is an operation which directs some variable, so that the condition may be false after some finite amount of time. If the condition will not false in any iteration of the loop, then the loop can proceed for an infinite amount of time. The above-question states that the while loop and do while loop can be infinite which is a true statement. But it also states that the 'for' loop can not be infinite which is not a correct statement which is described above. Hence false is the correct answer to the above question.
Know the Answer?
Not Sure About the Answer?
Find an answer to your question ✅ “In Java, it is possible to create an infinite loop out of while and do loops, but not for-loops. true or false ...” in 📘 Computers and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers