100% tevredenheidsgarantie Direct beschikbaar na je betaling Lees online óf als PDF Geen vaste maandelijkse kosten 4.2 TrustPilot
logo-home
Tentamen (uitwerkingen)

JAVA CH8 EXAMINATION QUESTIONS WITH CORRECT ANSWERS

Beoordeling
-
Verkocht
-
Pagina's
6
Cijfer
A+
Geüpload op
12-09-2025
Geschreven in
2025/2026

JAVA CH8 EXAMINATION QUESTIONS WITH CORRECT ANSWERS

Instelling
JAVA
Vak
JAVA









Oeps! We kunnen je document nu niet laden. Probeer het nog eens of neem contact op met support.

Geschreven voor

Instelling
JAVA
Vak
JAVA

Documentinformatie

Geüpload op
12 september 2025
Aantal pagina's
6
Geschreven in
2025/2026
Type
Tentamen (uitwerkingen)
Bevat
Vragen en antwoorden

Onderwerpen

Voorbeeld van de inhoud

JAVA CH8 EXAMINATION
QUESTIONS WITH CORRECT
ANSWERS

8.9 Q1: enum types are implicitly ________ and enum constants are implicitly
________.
a. a. final, static.
b. b. static, static.
c. c. static, final.
d. d. final, final.
. - Answer- ANS: a. final, static

8.9 Q2: Which statement is false?
a. a. An enum declaration is a comma-separated list of enum constants and may
optionally include other components of traditional classes, such as constructors, fields
and methods.
b. b. Any attempt to create an object of an enum type with operator new results in a
compilation error.
c. c. An enum constructor cannot be overloaded.
d. d. An enum constructor can specify any number of parameters. - Answer- ANS: c. An
enum constructor cannot be overloaded.

8.9 Q3: Which method returns an array of the enum's constants?
a. a. values.
b. b. getValues.
c. c. constants.
d. d. getConstants. - Answer- ANS: a. values.

8.10 Q1: Which of the following is false?
a. a. Method finalize does not take parameters and has return type void.
b. b. Memory leaks using Java are rare because of automatic garbage collection.
c. c. Objects are marked for garbage collection by method finalize.
d. d. The garbage collector reclaims unused memory. - Answer- ANS: c. Objects are
marked for garbage collection by method finalize. (Objects are marked for garbage
collection when there are no more references to the object).

8.11 Q1: Static class variables:
a. a. are final.
b. b. are public.
c. c. are private.

, d. d. are shared by all objects of a class. - Answer- ANS: d. are shared by all objects of
a class.

8.11 Q2: Which of the following is false?
a. a. A static method must be used to access private static instance variables.
b. b. A static method has no this reference.
c. c. A static method can be accessed even when no objects of its class have been
instantiated.
d. d. A static method can call instance methods directly. - Answer- d. d. A static method
can call instance methods directly.

8.12 Q1: Which syntax imports all static members of class Math?
a. a. static import java.lang.Math.*.
b. b. import static java.lang.Math.*.
c. c. static import java.lang.Math.
d. d. import static java.lang.Math. - Answer- ANS: b. import static java.lang.Math.*.

8.13 Q1: Instance variables declared final do not or cannot:
a. a. Cause syntax errors if used as a left-hand value.
b. b. Be initialized.
c. c. Be modified.
d. d. None of the above. - Answer- ANS: c. Be modified.

8.13 Q2: A final field should also be declared ________ if it is initialized in its
declaration.
a. a. private.
b. b. public.
c. c. protected.
d. d. static. - Answer- ANS: d. static.

8.16 Q1: A package is:
a. a. A directory structure used to organize classes and interfaces.
b. b. A mechanism for software reuse.
c. c. A group of related classes and interfaces.
d. d. All of the above. - Answer- ANS: d. All of the above.

8.16 Q2: A class within a package must be declared public if
a. a. It will be used only by other classes in the same package.
b. b. It will be used by classes that are not in the same package.
c. c. It is in the same directory as the other classes in the package.
d. d. It has a unique name. - Answer- ANS: b. It will be used by classes that are not in
the same package. Classes outside the package cannot use a class if the class is not
declared public.

Maak kennis met de verkoper

Seller avatar
De reputatie van een verkoper is gebaseerd op het aantal documenten dat iemand tegen betaling verkocht heeft en de beoordelingen die voor die items ontvangen zijn. Er zijn drie niveau’s te onderscheiden: brons, zilver en goud. Hoe beter de reputatie, hoe meer de kwaliteit van zijn of haar werk te vertrouwen is.
wisdompoint chamberlain college of nursing
Bekijk profiel
Volgen Je moet ingelogd zijn om studenten of vakken te kunnen volgen
Verkocht
114
Lid sinds
2 jaar
Aantal volgers
66
Documenten
5307
Laatst verkocht
1 week geleden
Nursing Tec

3.7

16 beoordelingen

5
6
4
3
3
5
2
0
1
2

Recent door jou bekeken

Waarom studenten kiezen voor Stuvia

Gemaakt door medestudenten, geverifieerd door reviews

Kwaliteit die je kunt vertrouwen: geschreven door studenten die slaagden en beoordeeld door anderen die dit document gebruikten.

Niet tevreden? Kies een ander document

Geen zorgen! Je kunt voor hetzelfde geld direct een ander document kiezen dat beter past bij wat je zoekt.

Betaal zoals je wilt, start meteen met leren

Geen abonnement, geen verplichtingen. Betaal zoals je gewend bent via iDeal of creditcard en download je PDF-document meteen.

Student with book image

“Gekocht, gedownload en geslaagd. Zo makkelijk kan het dus zijn.”

Alisha Student

Veelgestelde vragen