Ask Question
13 June, 08:12

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

+2
Answers (1)
  1. 13 June, 10:59
    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?
Get 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 & Technology if there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers