The Straight answer is no and we have an exciting #stackoverflow Post about the same. That post is pretty old and mainly discusses the alternatives we can have even if java doesn't have a straight way ...
Before Java SE 8, anonymous classes were typically used to pass functionality to a method. This practice obfuscated source code, making it harder to understand. Java 8 eliminated this problem by ...
From assertions in JDK 1.4 to the forthcoming lambdas in Java 8, the Java language has evolved considerably since its inception. The next several Java 101 articles present a toolbox of essential Java ...