Results 1 to 3 of 3
Thread: What does : mean?
- 01-17-2009, 09:12 PM #1
Member
- Join Date
- Jan 2009
- Posts
- 37
- Rep Power
- 0
-
That is a new version of the for loop called a foreach loop. Read it as such: for each String, (that we'll give the name fileName) in the array or collection args do...
This:
is the same as this:Java Code:for(String fileName : args) { System.out.println("File Name Is: " + fileName); }
Java Code:for(int i = 0; i < args.length; i++) { System.out.println("File Name Is: " + args[i]); }
- 01-17-2009, 09:25 PM #3
Member
- Join Date
- Jan 2009
- Posts
- 37
- Rep Power
- 0


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks