Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Document preview thumbnail
Preview 2 out of 6 pages
Exam (elaborations)

CSE 2221 Midterm 2 2025 Revision. | Exam Revision Questions And Correct Answers | Graded A+ | 2025 Update |

Document preview thumbnail
Preview 2 out of 6 pages

CSE 2221 Midterm 2 2025 Revision. | Exam Revision Questions And Correct Answers | Graded A+ | 2025 Update |

Content preview

CSE 2221 Midterm 2 2025 Revision. | Exam Revision Questions And Correct
Answers | Graded A+ | 2025 Update |




Kernel Interface Design - Answer The core interface of a class that defines essential
methods required for the class's functionality. It focuses on simplicity and consistency, forming the
foundation for other methods and functionality.

Constructor - Answer A special method used to initialize objects. When a new object is
created, the constructor is called to set initial values for the object's fields.

No-Argument Constructor - Answer A constructor that takes no parameters and initializes
an object with default values. If no constructors are explicitly defined, Java provides a default no-
argument constructor.

Copy Constructor - Answer A constructor that creates a new object as a copy of an existing
object, typically taking an object of the same class as an argument and replicating its state.

Instance Method - Answer A method that operates on an instance of a class (an object). It
can access and modify the instance's fields (data members).

Receiver - Answer The object on which an instance method is invoked. In Java, this is
implicitly represented by this, referring to the current object inside instance methods.

Distinguished Formal Parameter - Answer A special kind of formal parameter that plays a
significant role in the method's logic. In Java, this often refers to this, especially in constructors
and instance methods, where it distinguishes the current object from other parameters.

Parameter Modes - Answer Describes how arguments are passed to methods and affect
parameters.

@restores - Answer The argument is restored to its initial state after the method call.

@updates - Answer The argument is modified by the method.

, @replaces - Answer The argument is replaced by a new value.

@clears - Answer The argument is set to a cleared state.

Default Parameter Mode - Answer In Java, parameters are passed by value, which means a
copy of the value is passed to methods. For reference types, the reference (address) is copied, not
the object itself.

Primitive Type - Answer Basic data types built into Java, such as int, char, double, and
boolean. They store actual values rather than references to objects.

Reference Type - Answer A type that refers to an object. It stores a reference (or memory
address) to the object rather than the object itself. Examples include String, arrays, and any user-
defined class types.

Immutable Reference Type - Answer A reference type whose value cannot be modified after
creation, such as String. Even though you can assign a new value, the object itself doesn't change.

Mutable Reference Type - Answer A reference type that can be changed after creation, such
as arrays or objects of custom classes.

Reference Diagrams - Answer Visual representations of how variables point to objects in
memory, helping to illustrate how references work in Java.

Reference Value - Answer The memory address or reference to the location of an object. It
is what reference types store rather than the actual object data.

Object Value - Answer The actual data stored in an object, as opposed to the reference to
the object.

Assignment Operator (with Reference Types) - Answer When assigning one reference
variable to another, both variables will refer to the same object in memory.

Call-by-Copy (with Reference Types) - Answer When passing a reference type as an
argument to a method, Java passes a copy of the reference, meaning the method can modify the
object, but not the reference itself.

Document information

Uploaded on
June 1, 2025
Number of pages
6
Written in
2024/2025
Type
Exam (elaborations)
Contains
Questions & answers
$11.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.
LECTpharis
4.8
(8)
Sold
41
Followers
1
Items
6040
Last sold
2 months 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