CodingForums.com

CodingForums.com (http://www.codingforums.com/index.php)
-   Java and JSP (http://www.codingforums.com/forumdisplay.php?f=54)
-   -   !done (http://www.codingforums.com/showthread.php?t=180529)

etidd 10-26-2009 03:34 AM

!done
 
what does this mean...

while (!done)
{}

what does the !done mean?
thanks

cs_student 10-26-2009 03:48 AM

I would assume that done is a boolean variable.

The statement you have created is a while loop which will loop checking each time if the conditional evaluates to true. In the case you provided the conditional would be the opposite of the value 'done', due to the '!' not operator.


Code:

done = true;
if(done) System.out.println("done == true");
if(!done) System.out.println("evaluated to false and won't prinnt");


technica 10-26-2009 09:34 AM

Is it infinite loop? if not then it must be some Boolean variable whose value is set before using it in the while loop.

etidd 10-26-2009 05:51 PM

thanks. that helps.


All times are GMT +1. The time now is 09:26 AM.

Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.