ARS Kumar, Sun Certified Programmer for Java 2 Platform
http://www.automatedsqa.com/
ARS Kumar, Sun Certified Programmer for Java 2 Platform
http://www.automatedsqa.com/
<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR><B>Successful people in this world are those who get up and look for the circumstances they want. If they can't find them, they make them.</B><HR></BLOCKQUOTE>
Regards,<BR>Bhavani
Regards,<br />CSR.
Everyday is a Learning phase! Hence ask "What have I learnt today?"
Everyday is a Learning phase! Hence ask "What have I learnt today?"
Originally posted by Udayan:
Consider the code below
int i=0,j=0;
while(i+j<20)
{
System.out.println(i+j);
j+=i;
}
This loop executes JUST ONCE(??) when it should be an infinite loop.There is an abrupt completion of the loop.I think the problem is in the j+=i; statement 'cause removing it results in an infinite loop.BUT WHAT IS THE PROBLEM??
Consider Paul's rocket mass heater. |