Possible Duplicate:
What is a scan: block in Java?
I was browsing through some of the Java standard library code and I found the toUpperCase
method in String.java (java.lang.String
- JDK 1.6.0_32 x64). I've removed the irrelevant parts of the code in the snippet below.
The part that confused me was the scan: { ... }
syntax. I am under the impression that lambda expressions aren't a part of SE 6 or 7. Can somebody please enlighten me?
// String.java - line 2547 onwards.
public String toUpperCase(Locale locale) {
// Do stuff.
/* Now check if there are any characters that need to be changed. */
scan: {
// Do stuff.
}
// Do more stuff.
}