Revature
Assessment
(OOP &
Java)questions
and answers
Object-Oriented Programming - answer is a
methodology or paradigm to design a
program using classes and objects. It
simplifies the software development and
maintenance by providing some concepts
Object - answer Any entity that has state and
behavior. For example, a chair, pen, table,
keyboard, bike, etc. It can be physical or
logical
,Class - answer in the context of Java, are
templates that are used to create objects,
and to define object data types and methods
Advantages of OOPs over Procedure Oriented
Programming - answer OOPs makes
development and maintenance easier
whereas in a procedure-oriented
programming language it is not easy to
manage if code grows as project size
increases.
Constructor - answer It is called when an
instance of the object is created, and
memory is allocated for the object
When is a constructor called? - answer When
an object is created
Note: A default constructor is created if class
doesn't have any
Rules to remember while creating a
constructor - answer Constructor name must
be the same as its class name
, A Constructor must have no explicit return
type
A Java constructor cannot be abstract, static,
final, and synchronized
Types of constructors - answer Default
Constructor
Parameterized Constructor
Default Constructor - answer is a no-args
constructor that the Java compiler inserts on
your behalf
Parameterized Constructor - answer A
constructor which has a specific number of
parameters
Constructor Overloading - answer in Java is a
technique of having more than one
constructor with different parameter lists.
The benefits of buying summaries with Stuvia:
Guaranteed quality through customer reviews
Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.
Quick and easy check-out
You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.
Focus on what matters
Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!
Frequently asked questions
What do I get when I buy this document?
You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.
Satisfaction guarantee: how does it work?
Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.
Who am I buying these notes from?
Stuvia is a marketplace, so you are not buying this document from us, but from seller FREEMANSHARP. Stuvia facilitates payment to the seller.
Will I be stuck with a subscription?
No, you only buy these notes for $14.99. You're not tied to anything after your purchase.