Passer au contenu

Le mot-clé this

Introduit
Fiche de cours
Leçon vidéo pour ce sujet Ouvrir la page vidéo
7:20

Création de classes

Voici un étudiant, stocké sous forme de trois variables indépendantes : un nom, une année et une note. C'est correct. Ajoutez maintenant mille étudiants. Vous aurez besoin de trois mille variables…

Narration en anglais · sous-titres en anglais et en 中文 au choix

Dans cette leçon

Leçon vidéo
Vocabulaire
English Sens
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.

Fiche de cours

IGCSE, A-Level & AP