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
Document preview thumbnail
Voorbeeld 3 van de 16 pagina's
Tentamen (uitwerkingen)

CSE 205 Final Exam 2026: 100 Practice Questions with Answers and Explanations | PDF

Document preview thumbnail
Voorbeeld 3 van de 16 pagina's

CSE 205 Final Exam 2026: 100 Practice Questions with Answers and Explanations | PDF

Voorbeeld van de inhoud

CSE 205 Final Exam 2026: 100 Practice Questions
with Answers and Explanations | PDF

SECTION 1 (1–50) (Java Fundamentals, Variables, Loops, Conditions, Operators)


1. What will be the value of an integer variable after assigning 15 and then
adding 10 to it?
Answer: 25
Explanation: 15 + 10 = 25 using basic arithmetic addition.


2. What data type should you use in Java for storing true or false values?
Answer: boolean
Explanation: boolean stores only two values: true or false.


3. What will happen if you divide two integers like 7 divided by 2 in Java?
Answer: 3
Explanation: Integer division removes the decimal part.


4. What is the result of 10 % 3 in Java programming?
Answer: 1
Explanation: Modulus returns the remainder after division.


5. What keyword is used in Java to declare a constant variable?
Answer: final
Explanation: final prevents value changes after assignment.

,6. What will be printed if you concatenate "Hello" and 5 using + operator?
Answer: Hello5
Explanation: String concatenation converts numbers to text.


7. What is the default value of a boolean variable declared globally in Java?
Answer: false
Explanation: Instance variables default to false if not initialized.


8. What happens when you use == between two primitive integers in Java?
Answer: Value comparison
Explanation: == compares actual numeric values for primitives.


9. What will be the output of 5 + 2 * 3 in Java following operator precedence?
Answer: 11
Explanation: Multiplication happens before addition.


10. What symbol is used to write a single-line comment in Java code?
Answer: //
Explanation: Double slash comments out a single line.


11. What happens if a variable is declared but not initialized inside a method?
Answer: Compilation error
Explanation: Local variables must be initialized before use.


12. What is the result of comparing 10 > 5 in a Java program?

, Answer: true
Explanation: 10 is greater than 5, so condition is true.


13. What type of loop executes at least once regardless of condition?
Answer: do-while loop
Explanation: Condition is checked after execution.


14. What will be printed when using System.out.println(3 + "3")?
Answer: 33
Explanation: Number is converted to string and concatenated.


15. What is the result of logical AND (&&) when one condition is false?
Answer: false
Explanation: AND requires both conditions to be true.


16. What keyword is used to create an object in Java?
Answer: new
Explanation: new allocates memory for objects.


17. What will happen if you try to access an array index that does not exist?
Answer: Runtime error (ArrayIndexOutOfBoundsException)
Explanation: Java prevents invalid memory access.


18. What is the size of an int data type in Java?
Answer: 32 bits
Explanation: Java defines int as a 4-byte value.

Documentinformatie

Geüpload op
4 mei 2026
Aantal pagina's
16
Geschreven in
2025/2026
Type
Tentamen (uitwerkingen)
Bevat
Vragen en antwoorden
€31,00

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

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.
Verkocht
170
Volgers
6
Items
2118
Laatst verkocht
7 uur geleden


Echte notities, van echte studenten
Elk document op Stuvia is geschreven door een medestudent die hetzelfde vak deed. Zo leer je van iemand die het al heeft gehaald.



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