Ce diaporama a bien été signalé.
Le téléchargement de votre SlideShare est en cours. ×

Lets have a look at the JAVA declaration of an object- e-g- MyObject O.docx

Publicité
Publicité
Publicité
Publicité
Publicité
Publicité
Publicité
Publicité
Publicité
Publicité
Publicité
Publicité

Consultez-les par la suite

1 sur 1 Publicité

Lets have a look at the JAVA declaration of an object- e-g- MyObject O.docx

Télécharger pour lire hors ligne

Let’s have a look at the JAVA declaration of an object, e.g. MyObject O = new MyObject(); What does the variable O contain?
A. A reference (or pointer) to the object.
B. The object itself(all files and methods).
C. The value of the first field of the object.
D. A reference to the class declaration JAVA byte code.
Solution
Object Declaration :
MyObject O = new MyObject();
It is the most common way to create an object in java using new key word.
In this O simply holds the memory address of the actual \"MyObject\" object.
Option A is the correct choice.
.

Let’s have a look at the JAVA declaration of an object, e.g. MyObject O = new MyObject(); What does the variable O contain?
A. A reference (or pointer) to the object.
B. The object itself(all files and methods).
C. The value of the first field of the object.
D. A reference to the class declaration JAVA byte code.
Solution
Object Declaration :
MyObject O = new MyObject();
It is the most common way to create an object in java using new key word.
In this O simply holds the memory address of the actual \"MyObject\" object.
Option A is the correct choice.
.

Publicité
Publicité

Plus De Contenu Connexe

Plus par sthomas232 (20)

Plus récents (20)

Publicité

Lets have a look at the JAVA declaration of an object- e-g- MyObject O.docx

  1. 1. Let’s have a look at the JAVA declaration of an object, e.g. MyObject O = new MyObject(); What does the variable O contain? A. A reference (or pointer) to the object. B. The object itself(all files and methods). C. The value of the first field of the object. D. A reference to the class declaration JAVA byte code. Solution Object Declaration : MyObject O = new MyObject(); It is the most common way to create an object in java using new key word. In this O simply holds the memory address of the actual "MyObject" object. Option A is the correct choice.

×