• Wrong document? Swap it for free
  • Written by students who passed
  • Immediately available after payment
  • Read online or as PDF
Sell
Where do you study
Your language
Document preview thumbnail
Preview 4 out of 73 pages
Exam (elaborations)

CSE 205 Final Exam Practice Test – 200 Q&A Java OOP, Data Structures & Algorithms Study Guide

Document preview thumbnail
Preview 4 out of 73 pages

CSE 205 Final Exam Practice Test – 200 Q&A Java OOP, Data Structures & Algorithms Study Guide

Content preview

CSE 205 Final Exam Practice Test--- --- --- --- --- ---




200 Questions with Answers & Explanations
--- --- --- --- --- ---




Java OOP, Data Structures & Algorithms --- --- --- --- --- ---




Study Guide NEW ---



--
-



SECTION 1: OBJECT-ORIENTED PROGRAMMING BASICS (Questions
--- --- --- --- --- ---


1-30)---




Question 1: --- ---


What is encapsulation in Java?
--- --- --- --- ---


A) Hiding implementation details and exposing only necessary methods
--- --- --- --- --- --- --- ---


B) Inheriting properties from parent classes --- --- --- --- ---


C) Creating multiple forms of a single method
--- --- --- --- --- --- ---


D) Binding data and methods together --- --- --- --- ---




Answer: A --- ---


Explanation: Encapsulation is the mechanism of hiding internal implementation
--- --- --- --- --- --- --- --- ---


details and providing a public interface through methods. It protects data
--- --- --- --- --- --- --- --- --- --- ---


integrity by controlling access through getters and setters.
--- --- --- --- --- --- --- ---




--
-



Question 2: --- ---


Which keyword is used to inherit a class in Java?
--- --- --- --- --- --- --- --- --- ---


A) implements ---


B) extends ---


C) inherits ---


D) super ---

,Answer: B --- ---


Explanation: The 'extends' keyword is used for class inheritance in Java.
--- --- --- --- --- --- --- --- --- --- ---


'Implements' is used for interfaces. --- --- --- --- ---




--
-



Question 3: --- ---


What is the output of the following
--- --- --- --- --- --- ---




code? java class Parent {
--- --- --- --- --------------- void ---




display() { --- ---




------------------------ System.out.println("Parent"); ---




------------ }---




} class Child extends
--- --- --- ---




Parent { --- --------------- void display() --- ---




{ ---




------------------------ System.out.println("Child"); ---




------------ }---




} public class Test {
--- --- --- --- --------------- public static --- ---




void main(String[] args) {
--- --- --- ---------------------------




Parent p = new Child(); --- --- --- --- ---




------------------------ p.display(); ---




------------ }---




} ---




A) Parent ---


B) Child ---


C) Compilation Error --- ---


D) Runtime Error --- ---

,Answer: B --- ---


Explanation: This demonstrates polymorphism - the overridden method in Child
--- --- --- --- --- --- --- --- --- ---


class is called even though the reference is of Parent type because the actual
--- --- --- --- --- --- --- --- --- --- --- --- --- ---


object is Child.
--- --- ---




--
-



Question 4: --- ---


What is an abstract class?
--- --- --- --- ---


A) A class that cannot be instantiated
--- --- --- --- --- ---


B) A class that can only be inherited
--- --- --- --- --- --- ---


C) A class with only static methods
--- --- --- --- --- ---


D) A class with no methods
--- --- --- --- ---




Answer: A --- ---


Explanation: An abstract class cannot be instantiated directly. It serves as a
--- --- --- --- --- --- --- --- --- --- --- ---


blueprint for subclasses and may contain abstract methods that must be
--- --- --- --- --- --- --- --- --- --- ---


implemented by concrete subclasses. --- --- --- ---




--
-



Question 5: --- ---


What is the difference between an interface and an abstract class?
--- --- --- --- --- --- --- --- --- --- ---


A) Interface can have implementation, abstract class cannot
--- --- --- --- --- --- ---


B) Abstract class can have implementation, interface cannot (prior to Java 8)
--- --- --- --- --- --- --- --- --- --- ---


C) Both are the same
--- --- --- ---


D) Interface cannot have variables --- --- --- ---




Answer: B --- ---


Explanation: Abstract classes can have concrete methods with implementations.
--- --- --- --- --- --- --- --- ---


Interfaces (before Java 8) could only declare method signatures, not provide
--- --- --- --- --- --- --- --- --- --- ---


implementations. ---




--
-



Question 6: --- ---


What is method overloading?
--- --- --- ---

, A) Same method name, different parameters
--- --- --- --- --- ---


B) Same method name, same parameters
--- --- --- --- --- ---


C) Different method name, same parameters
--- --- --- --- ---


D) Inheriting method from parent
--- --- --- ---

Document information

Uploaded on
October 16, 2026
Number of pages
73
Written in
2026/2027
Type
Exam (elaborations)
Contains
Questions & answers
$25.99

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
ProfReginaBank
4.4
(5)
Sold
45
Followers
2
Items
2543
Last sold
2 days ago



Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions