Project Management Professional: Core Java Interview Questions!

Tuesday, July 21, 2020

Core Java Interview Questions!


17.Tell me something about OOPs

Ans. OOPs or Object Oriented Programming is a Programming model which is organized around Objects instead of processes. Instead of a process calling series of processes, this model stresses on communication between objects. Objects that all self sustained, provide security by encapsulating it's members and providing abstracted interfaces over the functions it performs. OOP's facilitate the following features


1. Inheritance for Code Reuse

2. Abstraction for modularity, maintenance and agility

3. Encapsulation for security and protection

4. Polymorphism for flexibility and interfacing


18.Difference between Predicate, Supplier and Consumer ?


Ans. Predicate represents an anonymous function that accepts one argument and produces a result.


Supplier represents an anonymous function that accepts no argument and produces a result.


Consumer represents an anonymous function that accepts an argument and produces no result.


No comments: