for (type variableName : arrayName) { // code block to be executed }. The following example outputs all elements in the cars array, using a "for-each" loop: ...
確定! 回上一頁