CSE 205 Final Exam Study Companion
2026/2027: Key Topics, Practice Problems,
and Detailed Answer Explanations
Question 1:
Having multiple class methods with the same name but different parameters is known
as:
A. Encapsulation
B. Information hiding
C. Method overloading
D. Method overriding
Correct Answer: C. Method overloading
Rationale: Method overloading occurs when a class contains multiple methods with
the same name but different parameter lists (either in number or type). This allows
flexibility and improves code readability. Encapsulation refers to bundling data and
methods, while information hiding restricts access to internal details. Method
overriding, in contrast, occurs in inheritance when a subclass provides a specific
implementation of a method already defined in its parent class.
Question 2:
The relationship between a class and an object is best described as:
A. Objects are instances of classes
B. Classes are instances of objects
C. Objects and classes are identical
D. Classes are variables
Correct Answer: A. Objects are instances of classes
Rationale: A class is a blueprint or template, while an object is a concrete instance
created from that blueprint. This is a fundamental concept in object-oriented
programming. Classes define structure and behavior, whereas objects represent actual
usable entities in memory.
Question 3:
Which class declaration is most appropriate for a car in Java?
,2026/2027
A. public class car
B. private class Car
C. public class CAR
D. private class car
E. public class Car
Correct Answer: E. public class Car
Rationale: Java naming conventions recommend PascalCase for class names. Classes
are typically declared as public so they can be accessed from other classes. Lowercase
or incorrect access modifiers reduce clarity or violate conventions.
Question 4:
Which keyword is used to create an object in Java?
A. class
B. new
C. import
D. public
Correct Answer: B. new
Rationale: The keyword new is used to instantiate objects in Java by allocating
memory and calling the constructor. Other options serve different purposes such as
defining visibility or importing libraries.
Question 5:
API stands for:
A. Application Parameter Internet
B. Application Programming Interface
C. Advanced Programming Integration
D. Applied Processing Instruction
Correct Answer: B. Application Programming Interface
Rationale: API refers to a set of rules that allow programs to communicate with each
other. It defines how software components interact and is widely used in modern
development for integration.
Question 6:
A constructor primarily defines:
, 2026/2027
A. Number of methods in a class
B. Object initialization
C. Object deletion
D. Data hiding rules
Correct Answer: B. Object initialization
Rationale: Constructors are special methods used to initialize objects when they are
created. They set initial values for instance variables and prepare the object for use.
Question 7:
Java methods can return only primitive types.
A. True
B. False
Correct Answer: B. False
Rationale: Java methods can return primitive types as well as objects, arrays, and
user-defined types. Restricting return types only to primitives is incorrect.
Question 8:
All Java classes must contain a main method.
A. True
B. False
Correct Answer: B. False
Rationale: Only executable programs require a main method. Many classes serve as
data models or utilities and do not require it.
Question 9:
A class that extends another class is known as:
A. Parent class
B. Child class
C. Interface
D. Object class
Correct Answer: B. Child class
Rationale: A subclass (child class) inherits properties and behaviors from a parent
class, enabling reuse and extension of functionality.