OOPS Java !!

Object: Whenever JVM encounter new keyword,it creates a new instance of the class with its own state and behavior which is termed as an object.
Object Oriented Programming is a methodology to create a program with classes and objects

 In Java we do create objects and classes and deal with them,hence it is an object oriented programming language.
Because of its primitives , Java is not 100% object oriented programming language.
So..which are 100% OOP language?
Smalltalk,Simula and few other are in those list.

OOPS Concepts:
Abstraction- Hiding the internal functionality and details is known to be abstraction.In Java,it is achieved through abstract classes and interfaces.


Inheritance -Acquiring all behavior and properties of the Parent class by the child class.
Code reusability and runtime polymorphism is achieved thrigh inheritance.


Polymorphism- In Java,polymorphism refers to the ability of a methods to take many forms.
It is achieved through overloading and overriding.


Ecapsulation-Wrapping up the data from the users using private/protected access modifiers and giving access to only the public methods.







Comments

Popular posts from this blog

Sorting Algotithms

Bitwise right shift operators in Java

Program to to Merge Two sorted Linked lists in Java