Your while statement is in error
<span>while (wage = 0) assigns 0 to wage.
What you want is to compare wage to 0, ie.:
while (wage == 0).
However, comparing double's to some value is very bad practice due to rounding errors. Much safer is to always have a < or > in there:
while (wage < 0.0001)
If you confuse assignment (=) and comparison (==) often, and you don't have a compiler to warn you for this, you can adopt the coding style to put the constant first:
while(0 == x)</span>
Answer:
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.
Answer:
The following statement is 'True'.
Explanation:
There is a software named 'Proprietary software' and also called 'closed-source software', it's non-free software and used to describe the software that is not freely licensed such as operating system, file formats, and system programs. this software is licensed for studying, sharing, modification, redistribution and reverse engineering and has the copyright to use the software under only certain conditions and we can also say that it bears limit against these types of uses.