(updated 2026) Questions &
Answers | Latest Already Graded
A+
Object - 🧠 ANSWER ✔✔An instance of a class
Class - 🧠 ANSWER ✔✔Blueprint/prototype from which objects are created
Inheritance - 🧠 ANSWER ✔✔subclasses can inherit states/behaviors of
superclasses
,interface - 🧠 ANSWER ✔✔contract between class and outside world; when
a class implements an interface, it promises to provide the behavior
published by that interface
package - 🧠 ANSWER ✔✔a namespace for organizing classes & interfaces
in a logical manner; makes large software projects easier to manage
Encapsulation - 🧠 ANSWER ✔✔Hiding the internal state of an object and
requiring all interaction to be performed through an object's methods
(accessors and mutators).
Example: In a Bicycle class, method changeGear() could be implemented
so as to only accept values between 1 and 6
Benefits of Objects - 🧠 ANSWER ✔✔Modularity
Information-Hiding
Code re-use
Pluggability and debugging ease
,Modularity - 🧠 ANSWER ✔✔source code for an object can be
written/maintained independently of source code for other objects. objects
can be easily passed around the system once they've been created.
Information-Hiding - 🧠 ANSWER ✔✔By interacting only with object's
methods, details of internal implementation stay secret from outside world.
Code re-use - 🧠 ANSWER ✔✔Complex objects only need to be coded
once; you can use classes that have already been created by others.
Pluggability/Debugging Ease - 🧠 ANSWER ✔✔If an object is causing
problems, you can easily remove it and put something else in its place.
Example: replace a bolt that is broken, not the whole machine.
How to use the changeGear() method on a Bicycle bike1? - 🧠 ANSWER
✔✔bike1.changeGear();
How many superclasses can a subclass have? - 🧠 ANSWER ✔✔ONLY
ONE
How many subclasses can inherit from the same superclass? - 🧠 ANSWER
✔✔Infinitely many
COPYRIGHT©PROFFKERRYMARTIN 2025/2026. YEAR PUBLISHED 2026. COMPANY REGISTRATION NUMBER: 619652435. TERMS OF USE.
PRIVACY STATEMENT. ALL RIGHTS RESERVED
, What is the main benefit of using inheritance? - 🧠 ANSWER ✔✔The
subclass contains all of the methods/fields of the superclass, but the
subclass' code focuses on the unique aspects, making code simpler and
easier to read.
Why must the superclass' code be carefully documented? - 🧠 ANSWER
✔✔Because that code is not physically in the subclass.
Interface - 🧠 ANSWER ✔✔the methods that a class is required to contain;
empty methods that are related
Should the methods in an interface be public or private? - 🧠 ANSWER
✔✔MUST be public
Packages - 🧠 ANSWER ✔✔organizes a set of related classes/interfaces;
like a folder on your computer
class library - 🧠 ANSWER ✔✔a set of packages
API - 🧠 ANSWER ✔✔Application Programming Language: Java's library of
classes that you can use in your own applications.