# 课程：类和对象

> 原文： [https://docs.oracle.com/javase/tutorial/java/javaOO/index.html](https://docs.oracle.com/javase/tutorial/java/javaOO/index.html)

凭借您现在掌握的 Java 编程语言基础知识，您可以学习编写自己的类。在本课程中，您将找到有关定义自己的类的信息，包括声明成员变量，方法和构造函数。

您将学习如何使用类创建对象，以及如何使用您创建的对象。

本课程还介绍了其他类中的嵌套类和枚举

## [课程](classes.html)

This section shows you the anatomy of a class, and how to declare fields, methods, and constructors.

## [物件](objects.html)

This section covers creating and using objects. You will learn how to instantiate an object, and, once instantiated, how to use the `dot` operator to access the object's instance variables and methods.

## [更多类别](more.html)

This section covers more aspects of classes that depend on using object references and the `dot` operator that you learned about in the preceding section: returning values from methods, the `this` keyword, class vs. instance members, and access control.

## [嵌套类](nested.html)

Static nested classes, inner classes, anonymous inner classes, local classes, and lambda expressions are covered. There is also a discussion on when to use which approach.

## [枚举类型](enum.html)

This section covers enumerations, specialized classes that allow you to define and use sets of constants.