You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

3 lines
324 B
Markdown

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

Java 的循环语法和C完全一致包括 for 循环和 while do 、do while 循环。因此我们对两种语言一致的地方并不做过多的讲解,这里只看看几个简单的例子。
Java还有一个比较特殊的for循环专门是用在数组和集合的数据结构上的我们在后面会讲到。