Object Oriented Programming
Since Java is an object oriented programming language it has following features:• Reusability of Code
• Emphasis on data rather than procedure
• Data is hidden and cannot be accessed by external functions
• New data and functions can be easily added Java has powerful features.
The following are some of them:-
* Simple
* Reusable
* Portable (Platform Independent)
* Distributed
* Robust
* Secure
* High Performance
* Dynamic
* Threaded
* Interpreted
Object Oriented Programming is a method of implementation in which programs are organized as cooperative collection of objects, each of which represents an instance of a class, and whose classes are all members of a hierarchy of classes united via inheritance relationships.
OOPS Concepts
Four principles of Object Oriented Programming are:v Abstraction
v Encapsulation
v Inheritance
v Polymorphism
Abstraction
Abstraction denotes the essential characteristics of an object that distinguish it from all other kinds of objects and thus provide crisply defined conceptual boundaries, relative to the perspective of the viewer.
Encapsulation
Encapsulation is the process of compartmentalizing the elements of an abstraction that constitute its structure and behavior ; encapsulation serves to separate the contractual interface of an abstraction and its implementation.
Encapsulation
* Hides the implementation details of a class.
* Makes the code more maintainable.
Inheritance
Inheritance is the process by which one object acquires the properties of another object.
Polymorphism
Polymorphism is the existence of the classes or methods in different forms or single name denoting different implementations.