Are the following 4 pieces of code equivalent to each other?

jabber (jabber)
1) for(int i=0; i<10; i++) {
System.out.println("i =" +i);
}
2) for(int i=0; i<10; ++i) {
System.out.println("i =" +i);
}
3) for(int i=0; i<10; ) {
System.out.println("i =" +i);
i++;
}
4) for(int i=0; i<10; ) {
System.out.println("i =" +i);
++i;
}

The question is: Are the above 4 pieces of code equivalent to each other? Can anybody tell me why? Thank you so much.
(#9387@0)
2000-9-26 -05:00

回到话题: Are the following 4 pieces of code equivalent to each other?

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

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