Introduction to Java Programming language.

Posted by admin at June 11, 2020

Java is simple and yet powerful object oriented programming language and it’s in  many respects similer to C++. Java originated at Sun Microsystems, Inc. in  1991, It was concieved by James Gosling, Patrick Naughton, Cris Warth, Ed Frank, and Mike Sheridan at Sun Microsystems, Inc. It was developed to provide a plateform-independent programming language.

Object oriented programming is the 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.

There are four principles of Object Oriented Programming.

  • Abstraction
  • Encapsulation
  • Inheritance
  • 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 compartmentlizing the elements of an abstraction that constitute it’s structure and behavior, encapsulation serves to separate the contractual interface of an abstraction and it’s implementation.

  • Hides all the implementation details of a class.
  • Forces the user to use an interface to access data.
  • Makes the code more maintainable.

Inheritance

Inheritance is the process by which one object aquires the properties of another object.

That is mean when we want the same behavior of the object on different places then we define a parent object that holds the behavior and then when we need that behavior simple inherit the property of the object and use it.

Polymorphism.

Polymorphism is the existence of the classes or methods in different forms or single name denoting different implementations.


Comments

Write a Reply or Comment

Your email address will not be published. Required fields are marked *