help me,jabber!Thank you very much!

forever (kp)
dog()
{
for (int i=1;i<10;)
System.out.println(i);
}
this function will never end ,it will print endless1 because it do nothing after the judgement i<10
but why the function below runs ok?
public static void print(Collection c)
{
for (Iterator x=c.iterator();x.hasNext();)
System.out.print(x.next()+" ");
System.out.println();
}
(#33373@0)
2001-3-15 -05:00

回到话题: help me,jabber!Thank you very much!

回到论坛: HOME枫下论坛枫下论坛主坛工作学习IT杂谈

URL:   
http://www.rolia.net/zh/post.php?f=0&p=33373