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 13 pages
Exam (elaborations)

LATEST REVATURE JAVA QUESTIONS WITH 100% CORRECT ANSWERS

Document preview thumbnail
Preview 2 out of 13 pages

LATEST REVATURE JAVA QUESTIONS WITH 100% CORRECT ANSWERS LATEST REVATURE JAVA QUESTIONS WITH 100% CORRECT ANSWERS

Content preview

LATEST REVATURE JAVA 2024-2025
QUESTIONS WITH 100% CORRECT ANSWERS
What is Encapsulation? - CORRECT ANSWER The hiding of instance members by
making them private and providing public getters and setters.



What is Abstraction? - CORRECT ANSWER The hiding of implementation details and
complexity / behavior, only displaying the essential information to the user.



What is Inheritance? - CORRECT ANSWER The mechanism by which a new class
derives its properties and methods from super classes.



This can help increase code reuse by allowing similar classes to get fields and methods
from one parent class.



What is Polymorphism? - CORRECT ANSWER The ability for methods and classes to
take on various forms throughout the life of the project.



What are the different types of polymorphism? - CORRECT ANSWER Overloading:
Same method, different parameters (type, amount, or order); compile time



Overriding: Same method, same functionality, different implementation (used in the
child class instead of the parent class); run time



IS-A rule: Child class is the same type as the parent class

, LATEST REVATURE JAVA 2024-2025
QUESTIONS WITH 100% CORRECT ANSWERS
Static - CORRECT ANSWER Static denotes a variable or method that lives on the
class and not created on every single object. A simpler way of putting this is a variable
or method is one per class. Every instance that is created do not get their own and
instead share the variable and implementation of the static method.



What is Casting? - CORRECT ANSWER Explicitly converting one type of object to
another type. Larger objects must be casted into smaller objects whereas smaller
objects do not need to be.



How many objects on the heap if I cast? - CORRECT ANSWER Casting doesn't affect
the number of objects on the heap



What is an Interface? - CORRECT ANSWER A contract that is implemented by other
interfaces and classes, stating what methods and variables are to be used. Can be used
in Spring Data as a derivative for a database (without implementation)



What is an Abstract class? - CORRECT ANSWER A class that provides halfway
implementation of the methods and as such cannot be implemented. It must have
constructors and may have concrete methods.



Can I instantiate an Abstract class? Constructor? - CORRECT ANSWER You cannot
instantiate an abstract class or constructors; however, objects can be instantiated by
passing variables through a constructor

Document information

Uploaded on
August 13, 2024
Number of pages
13
Written in
2024/2025
Type
Exam (elaborations)
Contains
Questions & answers
£10.79

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.
Courseinstructor
4.5
(26)
Sold
137
Followers
61
Items
2012
Last sold
1 day ago




Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their exams and reviewed by others who've used these revision notes.

Didn't get what you expected? Choose another document

No problem! You can straightaway pick a different document that better suits what you're after.

Pay as you like, start learning straight 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 smashed 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