Skip to content

Using objects: String, Math, and wrappers · ⁨使用对象:String、Math 和包装类⁩

English

Using objects

  • An object is a value that knows how to do things. You call its methods with a dot ..
  • A String is an object. Math, Integer, and Double give you ready-made tools.
  • In this lesson you learn to make objects and use their methods.

中文

使用对象

  • 对象(object)是一个会做事情的值。你用点号 . 来调用它的方法(method)。
  • String 就是一个对象。Math、Integer 和 Double 给你现成的工具。
  • 在这节课里,你学习如何创建对象并使用它们的方法。

调用 length、max 或 toUpperCase 会运行方法并返回一个值

Handout

Log in or create account · ⁨登录或创建账户⁩

IGCSE, A-Level · ⁨IGCSE、A-Level⁩ & AP · ⁨与 AP⁩