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.
With the knowledge you now have of the basics of the Java programming language, you can learn to write your own classes. In this lesson, you will find information about defining your own classes, including declaring member variables, methods, and constructors.
You will learn to use your classes to create objects, and how to use the objects you create.
This lesson also covers nesting classes within other classes, and enumerations
dot
operator to access the object's instance variables and methods.
dot
operator
that you learned about in the preceding section:
returning values from methods, the this
keyword, class vs. instance members, and access control.