Geschreven door studenten die geslaagd zijn Direct beschikbaar na je betaling Online lezen of als PDF Verkeerd document? Gratis ruilen 4,6 TrustPilot
logo-home
Tentamen (uitwerkingen)

CMPT 213 FINAL EXAM PREP QUESTIONS WITH VERIFIED ANSWERS

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

CMPT 213 FINAL EXAM PREP QUESTIONS WITH VERIFIED ANSWERS .Field - ANSWERS-a member variable or data stored by an object .method - ANSWERS-a member function of the class that may operate on fields .References - ANSWERS-All objects are accessed by references .Type promotion - ANSWERS-Converting from a smaller to larger, can do implicitly double weight = 200; .Type demotion - ANSWERS-Converting from larger type to a smaller one Must cast int height = (int) 10.99 .Automatic garbage collection - ANSWERS-Objects with no references to them are automatically deleted .static method - ANSWERS-can be called on the class with no object. Also called class methods .static field - ANSWERS-Shared by all instances of the class .Pass by value - ANSWERS-Passing a primitive type passes its value Passing an object passes (by value) a reference to the object When passed an object, state can be modified What object it points to cannot be changed .Arrays - ANSWERS-Fixed size when created .Generic - ANSWERS-works with different types of objects .Collections - ANSWERS-Only stores objects, no primitives Use Wrapper classes such as Integer .String - ANSWERS-Compare using .equals() == compares the reference Immutable, cannot be changed once created. .Scanner - ANSWERS-Keyboard input done via Scanner Scanner scanner = new Scanner(S); S does not need to be closed, don't close a Scanner created from S .Files - ANSWERS-File(filepath) Represents a single file on disk (by path) Scanner(File) does reading, use .hasNextInt() .nextInt() PrintWriter(File) does writing, use .println() .Static factory method - ANSWERS-A static method which creates an object Like a constructor, but more flexible. Can give a descriptive name .Formatted printing - ANSWERS-Use printf() Sf(format string, arg0, ...); Sf("%s! Is it %b that you're %d?%n", "Waldo", true, 42); Waldo! Is it true that you're 42? .Wrapper - ANSWERS-A class to hold a primitive value .Interface - ANSWERS-A set of methods a class can choose to implement .FileFilter - ANSWERS-FileFilter filter = new FileFilter() { @Override public boolean accept(File file) { } }; .Anonymous class - ANSWERS-Instance of an unnamed class which is defined on the fly

Meer zien Lees minder
Instelling
CMPT 213
Vak
CMPT 213

Voorbeeld van de inhoud

CMPT 213 FINAL EXAM PREP
QUESTIONS WITH VERIFIED ANSWERS




\.Field - ANSWERS-a member variable or data stored by an object


\.method - ANSWERS-a member function of the class that may operate on fields


\.References - ANSWERS-All objects are accessed by references


\.Type promotion - ANSWERS-Converting from a smaller to larger, can do implicitly


double weight = 200;


\.Type demotion - ANSWERS-Converting from larger type to a smaller one
Must cast


int height = (int) 10.99

,\.Automatic garbage collection - ANSWERS-Objects with no references to them
are automatically deleted


\.static method - ANSWERS-can be called on the class with no object. Also called
class methods


\.static field - ANSWERS-Shared by all instances of the class


\.Pass by value - ANSWERS-Passing a primitive type passes its value


Passing an object passes (by value) a reference to the object


When passed an object, state can be modified


What object it points to cannot be changed


\.Arrays - ANSWERS-Fixed size when created


\.Generic - ANSWERS-works with different types of objects


\.Collections - ANSWERS-Only stores objects, no primitives


Use Wrapper classes such as Integer

,\.String - ANSWERS-Compare using .equals()


== compares the reference


Immutable, cannot be changed once created.


\.Scanner - ANSWERS-Keyboard input done via Scanner


Scanner scanner = new Scanner(System.in);


System.in does not need to be closed, don't close a Scanner created from
System.in


\.Files - ANSWERS-File(filepath)
Represents a single file on disk (by path)


Scanner(File)
does reading, use .hasNextInt() .nextInt()


PrintWriter(File)
does writing, use .println()


\.Static factory method - ANSWERS-A static method which creates an object

, Like a constructor, but more flexible. Can give a descriptive name


\.Formatted printing - ANSWERS-Use printf()
System.out.printf(<format string>, arg0, ...);


System.out.printf("%s! Is it %b that you're %d?%n", "Waldo", true, 42);


Waldo! Is it true that you're 42?


\.Wrapper - ANSWERS-A class to hold a primitive value


\.Interface - ANSWERS-A set of methods a class can choose to implement


\.FileFilter - ANSWERS-FileFilter filter = new FileFilter() {


@Override
public boolean accept(File file) {
}
};


\.Anonymous class - ANSWERS-Instance of an unnamed class which is defined on
the fly

Geschreven voor

Instelling
CMPT 213
Vak
CMPT 213

Documentinformatie

Geüpload op
9 juni 2026
Aantal pagina's
43
Geschreven in
2025/2026
Type
Tentamen (uitwerkingen)
Bevat
Vragen en antwoorden

Onderwerpen

€13,34
Krijg toegang tot het volledige document:

Verkeerd document? Gratis ruilen Binnen 14 dagen na aankoop en voor het downloaden kun je een ander document kiezen. Je kunt het bedrag gewoon opnieuw besteden.
Geschreven door studenten die geslaagd zijn
Direct beschikbaar na je betaling
Online lezen of als PDF

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.
IszackBd University Of Washington
Volgen Je moet ingelogd zijn om studenten of vakken te kunnen volgen
Verkocht
35
Lid sinds
1 jaar
Aantal volgers
3
Documenten
5300
Laatst verkocht
1 week geleden
IszackBd Stuvia

Our store offers a wide selection of materials on various subjects and difficulty levels, created by experienced teachers. We specialize on NURSING,WGU,ACLS USMLE,TNCC,PMHNP,ATI and other major courses, Updated Exam, Study Guides and Test banks. If you don't find any document you are looking for in this store contact us and we will fetch it for you in minutes, we love impressing our clients with our quality work and we are very punctual on deadlines. Please go through the sets description appropriately before any purchase and leave a review after purchasing so as to make sure our customers are 100% satisfied. FOR ANY REQUEST FEEL FREE TO REACH US

Lees meer Lees minder
5,0

3 beoordelingen

5
3
4
0
3
0
2
0
1
0

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

Bezig met je bronvermelding?

Maak nauwkeurige citaten in APA, MLA en Harvard met onze gratis bronnengenerator.

Bezig met je bronvermelding?

Veelgestelde vragen