Example & Tutorial understanding programming in easy ways.

What is the difference between while(0) and while(1) ?

Basically,

While(1) is an infinite loop which will run till a break statement occurs. 

Similarly, while(2), while(3), while(255) etc will all give infinite loops only. 


-Whereas, While(0) does the exact opposite of this. When while(0) is used, it means the conditions will always be false. Thus, as a result, the program will never get executed.

Read More →
Search
R4R Team
R4Rin Top Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on R4R.in website is done by expert team not only with the help of books but along with the strong professional knowledge in all context like coding,designing, marketing,etc!