1.Java is a object oriented programming language(OOPS) why because it designed based on the concept classes and objects.
-
In java many programs created by defining a objects and classes.
Class → Blueprint Object → Real thing created from the blueprint
=> Purpose of using OOPS
- we can Write code once and use it many times by using inheritance.
- We can protect Data by Hiding important data using encapsulation.
- Divide a big program into smaller classes and objects.
- Easy Maintenance
- Better Security
- Supports large Applications
=> justification of OOPS
- Class
It is a blueprint or Template of Object
Object
It is a combination of States and Behaviour
Also it is a real or physical world entity
3.Inheritance
- An object of one class acting as an object of another class
=> Paradigm in java
- java supports paradigm also it supports multiple paradigm classifications of paradigm in java
- Object-oriented paradigm -Built in around Classes and object
- Procedural Paradigm-can use methods and functions
- Functional programming paradigm -Uses expressions like (Lambda Expression,streams API
=> Pillars of OOPS
- Encapsulation
- Inheritance
- Abstraction
- Polymorphism
Top comments (0)