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 4 out of 103 pages
Exam (elaborations)

Revature Interview Questions with correct answer3

Document preview thumbnail
Preview 4 out of 103 pages

Revature Interview Questions with correct answer3

Content preview

Revature Interview Questions with correct answers
Object Correct Answer-An instance of a class


Class Correct Answer-Blueprint/prototype from which objects are
created


Inheritance Correct Answer-subclasses can inherit states/behaviors of
superclasses


interface Correct Answer-contract between class and outside world;
when a class implements an interface, it promises to provide the
behavior published by that interface


package Correct Answer-a namespace for organizing classes &
interfaces in a logical manner; makes large software projects easier to
manage


Encapsulation Correct 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 Correct Answer-Modularity
Information-Hiding

,Code re-use
Pluggability and debugging ease


Modularity Correct 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 Correct Answer-By interacting only with object's
methods, details of internal implementation stay secret from outside
world.


Code re-use Correct Answer-Complex objects only need to be coded
once; you can use classes that have already been created by others.


Pluggability/Debugging Ease Correct 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? Correct
Answer-bike1.changeGear();


How many superclasses can a subclass have? Correct Answer-ONLY
ONE

,How many subclasses can inherit from the same superclass? Correct
Answer-Infinitely many


What is the main benefit of using inheritance? Correct 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? Correct
Answer-Because that code is not physically in the subclass.


Interface Correct 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? Correct
Answer-MUST be public


Packages Correct Answer-organizes a set of related classes/interfaces;
like a folder on your computer


class library Correct Answer-a set of packages


API Correct Answer-Application Programming Language: Java's library
of classes that you can use in your own applications.

, What do the Java API's packages represent? Give examples. Correct
Answer-tasks for general purpose programming: String, File, Socket,
some for developing GUIs.


What is a benefit of using packages? Correct Answer-It allows
developers to focus on the design of an application and NOT the
technical stuff that makes it work.


Real-world objects contain BLANK and BLANK. Correct Answer-
State, behavior


A software object's state is stored in BLANK Correct Answer-fields


A software object's behavior is exposed through BLANK Correct
Answer-methods (functions)


Hiding internal data from the outside world, and accessing it only
through publicly exposed methods is known as data BLANK Correct
Answer-Encapsulation


A blueprint for a software object is called a BLANK Correct Answer-
class


Common behavior can be defined in a BLANK and inherited into a
BLANK using the BLANK keyword Correct Answer-superclass,
subclass, extends

Document information

Uploaded on
October 8, 2024
Number of pages
103
Written in
2024/2025
Type
Exam (elaborations)
Contains
Questions & answers
$16.49

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.
cracker
3.8
(400)
Sold
2158
Followers
1346
Items
50067
Last sold
5 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