For loop in the form of : “for (A b : c)” in Java

前端 未结 7 906
耶瑟儿~
耶瑟儿~ 2021-01-13 12:32

This is the first time that I\'ve seen this kind of syntax :

// class Node
public class Node { 

...
...

}

public class Otherclass { ... }

Otherclass gra         


        
7条回答
  •  情话喂你
    2021-01-13 13:26

    It is the enhanced for statement. See section 14.14.2. The enhanced for statement of the Java Language Specification.

提交回复
热议问题