java
Click Here
Features of java
Click Here
versions of java
Click Here
java is programing language
Click Here
Previous
Next

object oriented programing using java

        What is Java?

Java is a programming language and a platform. Java is a high level, robust, object-oriented and secure programming language.

 

Java was developed by Sun Microsystems (which is now the subsidiary of Oracle) in the year 1995. James Gosling is known as the father of Java. Before Java, its name was Oak. Since Oak was already a registered company, so James Gosling and his team changed the name from Oak to Java.

 

    Platform: Any hardware or software environment in which a program runs, is known as a platform. Since Java has a runtime environment (JRE) and API, it is called a platform.

Java Example

Let’s have a quick look at Java programming example. A detailed description of Hello Java example is available in next page.

 

Simple.java

       procedure oriented programing (POP) 

To any programing problem in It is seen as performing sequential tasks like reading, processing and writing and many function are written to complete these tasks. A major drawback of pop is that many data items are declared  global so that they can be used by all the function of the program. this makes our Data becomes insecure; Because it can be changed unnecessarily by any functions. 

Object Oriented Programing (OOP)

To solve the problem in OOP, first we prepare a model of entities related to the problem which are called object. In fact objects are groups of  related data function. These are also called basic run time entities in object oriented system. These represent the real- world entities oof the problem- student, customers, product- that the program has to handle. In the real world, every entity has some  data and function. For example, if the entity is a student, then name, marks, percent etc. Can be its data and data, get data, put data,  etc. can be functions. The data contained in an object can be accessed only by the function of that object . but the function under one object can also be accessed by the functions of another objects.  

      Data Abstraction : summarization of data means simplification of complexity. Let us explain it this way, we kick the scooter to start it, and by kicking the scooter starts. We do not need to know why the scooter started due to kicking, what process was adopted inside the scooter for this, this quality itself is called abstraction.

Data Encapsulation: Object Oriented programing style combines data structure and functionality into an object. it describes the internal form of the object it communication with its user and also informs the object that can be used.

     Inheritance: This important and useful feature of Object oriented programing style. Through inheritance the characteristics of one class can be acquire from another class. This important method provides new dimension to our program.

Polymorphism : polymorphism means that one form can be converted into another and any work can be done accordingly in a different situation. Provides the facility to use object of similar function which have internal differences.

Message Passing : A message is a group of objects prepared in object- oriented passing style. When necessary, they send and receive messages to each other. 

Scroll to Top