Sunday, 18 March 2012

OOPS Concepts


Oops concepts
This tutorial will help you to understand about Java OOPS concepts with examples. Java is a Object Oriented Programming Language (OOPS). Lets we discuss about what are the features of OOPS. There are four main features of OOPS.
1) Encapsulation
2) Inheritance
3) Polymorphism
4) Abstraction
Lets we discuss about the about features in details.
Object:
An object is a software bundle of related state and behavior. Software objects are often used to model the real-world objects that you find in everyday life. This lesson explains how state and behavior are represented within an object, introduces the concept of data encapsulation, and explains the benefits of designing your software in this manner.

Class:
A class is a blueprint or prototype from which objects are created. This section defines a class that models the state and behavior of a real-world object. It intentionally focuses on the basics, showing how even simple classes can cleanly model state and behavior.
Example:
 class A
{
Int a;
Int b;
Void fun1()
Int fun2()
}



No comments:

Post a Comment