Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Java Beginners What Is OOPS In Java

 
 

Share on Google+Share on Google+

What Is OOPS In Java

Advertisement
This section describes you about the concept of OOPs.

What Is OOPS In Java

In this section we will learn about the basics of Java. Here we will see the concepts of OOPs. We will discuss the basics of OOPs.

OOPs, stands for Object Oriented Programming System that specifies a model for programming where the programmer focuses mainly around "Objects". In the object oriented programming language paradigm at first, all the objects are identified which has to be manipulate and then it is generalize as a class of object. Basically, an Object is an instance of a class. OOPs provides various concepts such as, Inheritance, Polymorphism, Encapsulation, Abstraction, etc.

The First Object Oriented Programming language is the Simula and the Smalltalk is the first complete object-oriented programming language. Now a days various languages implements the concept of OOPs. for example, Java, .NET, Python etc. Java is the language that implements the features of OOPs and is written as to use on the distributed applications either they are on corporate networks or internet.

Basics of OOPs

Object Oriented Programming System is a concept for designing programs using class and objects. Historically, the programs were written in procedural languages such as C. Programming in procedural languages were very difficult. Maintenance of the developed softwares using procedural languages was difficult. After, the implementation of OOPs in the programming languages made the software development easy and more maintainable. The basic concepts of OOPs are as follows :

  • Object : A real world entity is an object. An entity that has a state and behavior is called an Object. An object can be tangible or intangible. It has three characteristics namely : State, Behavior, and Identity. for example, Car, Table, etc.
     
  • Class : In OOPs Class provides a basic template or blueprint for defining properties, it may contains the group of objects with the common properties. Class allows for creating objects. A class may contain the following things : Data member, Constructor, Methods, Blocks etc.
     
  • Inheritance : Inheritance is the feature of OOPs using which the property of a parent class can be inherited to the child class. An inheritance facilitate the reusability of code. In Java programming inheritance is implemented using the "extends" keyword. A child class can inherit only the properties which are used with the prefix access modifier "public" and "protected". Java doesn't support multiple inheritance.
     
  • Polymorphism : Polymorphism is the feature of OOPs that allows to write the various methods with the same name. Java supports two types of  polymorphism know as compile time polymorphism and run time polymorphism.
     
  • Encapsulation : Encapsulation is the feature of OOPs that combines the methods and attributes into a class. This class is encapsulating the properties.
     
  • Abstraction : Abstraction is the special feature of OOPs that abstract the unwanted data from the user how have not concerned to it.

Some miscellaneous topics

Association : Association specifies the relationship between two classes into which the object of one class does the operation based on the other class. Using this feature method, data member of another class can be invoked.

Aggregation : Aggregation specifies the relationship between two classes into which the object of one class is the member of another class.

Composition : Composition specifies the aggregation relationship between two classes into which the object of one class is the compulsory member of another class.

Advertisements

If you enjoyed this post then why not add us on Google+? Add us to your Circles



Liked it!  Share this Tutorial


Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.

Posted on: July 8, 2013

Related Tutorials

Discuss: What Is OOPS In Java  

Post your Comment


Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 
Comments:0
DMCA.com