The Java Tutorials have been written for JDK 8. Examples and practices described in this page don't take advantage of improvements introduced in later releases and might use technology no longer available.
See Java Language Changes for a summary of updated language features in Java SE 9 and subsequent releases.
See JDK Release Notes for information about new features, enhancements, and removed or deprecated options for all JDK releases.
java.util.regex
package? Describe the purpose of each."foo"
. What is the start index? What is the end index? Explain what these numbers mean.\d
, \s
, and \w
. Describe each one, and rewrite it using square brackets.\d
, \s
, and \w
, write two simple expressions that match the opposite set of characters.(dog){3}
. Identify the two subexpressions. What string does the expression match?