While I was watching some other tutorials, I saw this many times.
The person would initialize a boolean variable as false. They would then create a while loop with this as it;s condition:
boolean done = false;
//Body of loop
Can someone explain to me what !done means??
Confused on something
Post a Reply
|Oldest Newest Rating|
· July 31, 2015
Yeah what Ji said.
In English, the code says:
While done is false, continue looping.
· July 30, 2015
done is initialize as false first.
then !done means this is true. So Simply the while loop is saying if it is true, then execute the body of the loop inside. if false, then don't.
hope it helps. Thanks
Java / Android Development
Very popular language used to create desktop applications, website applets, and Android apps.
|Bucky Roberts Administrator|