The first half of this tutorial introduced you to regular expressions and the Regex API. You learned about the Pattern class, then worked through examples demonstrating regex constructs, from basic pattern matching with literal strings to more compl…
Java’s character and assorted string classes offer low-level support for pattern matching, but that support typically leads to complex code. For simpler and more efficient coding, Java offers the Regex API. This two-part tutorial helps you get start…
End your tour of Java’s essential language features with Jeff’s introduction to Java 8’s method references, interface default and static methods, and three lesser known language updates that every Java developer should know about. You’ll also previe…
Get a primer on the basic syntax of lambda expressions and learn about target types, then find out how lambdas interact with scopes, local variables, the this and super keywords, and exceptions in your Java programs. Finish off by reviewing predefin…
This article completes my introduction to new Java language features introduced in Project Coin, the JDK 7 language update. So far I have introduced try-with-resources, switch-on-string, multi-catch, and final re-throw. This month I demonstrate enh…
Before JDK 7’s debut, Oracle invited the Java community to submit proposals for new language features to its Project Coin mailing list. The open call ran for one month and nearly 70 proposal forms were submitted. Eight features were then selected f…
Complete your tour of JDK 5’s language features by exploring autoboxing and unboxing, the enhanced for loop, static imports, varargs, and covariant return types.
This article wraps up my three-part focus on new features introduced in JDK 5, this ti…
Get the scoop on typesafe enums and learn how to use them properly in switch statements, then get started with Java annotations and meta-annotations types like Target, which you can use to clarify the purpose and function of annotations in your Ja…
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 language features, starting this week with ass…
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 language features, starting this week with asser…