Pular para o conteúdo

A Palavra-chave this

Introduzido
Material de apoio
Videoaula para este tópico Abrir a página do vídeo
7:20

Criação de Classes

Aqui está um aluno, armazenado como três variáveis soltas: um nome, um ano e uma nota. Isso funciona. Agora adicione mil alunos. Você precisaria de três mil variáveis…

Narração em inglês · legendas em inglês e 中文 que você pode alternar

Nesta aula

Videoaula
Vocabulário
English Significado
parameter/pəˈræmɪtə/A value that specifies a particular member of a family of functions, models or systems.
field/fiːld/A named item of data within a database record.
object/ˈɒbdʒekt/An entity in a program with associated state and behaviour, often an instance of a class.
argument/ˈɑːɡjuːmənt/Values or references supplied to a function or procedure when it is called.
unqualified names
instance method/ˈɪnstəns ˈmeθəd/A method invoked with a particular object as its receiver, allowing it to use that object's state.
instance variable
shadowing/ˈʃædəʊɪŋ/
static method/ˈstætɪk ˈmeθəd/A Java method belonging to a class, callable without creating an instance and without an implicit current object.
reference/ˈrefrəns/A value that refers to an object; copying this value does not copy the object itself.
compile error
current object/ˈkʌrənt ˈɒbdʒekt/The instance on which an instance method or constructor is operating, referred to by this.

Material de apoio

IGCSE, A-Level & AP