Introduction to Java programming






introduction


JAVA was developed by Sun Microsystems Inc in 1991, later acquired by Oracle Corporation. It was developed by James Gosling and Patrick Naughton. It is a simple programming language.  Writing, compiling and debugging a program is easy in java.  It helps to create modular programs and reusable code.


OBJECT ORIENTED PROGRAMMING

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.


OOP Concepts  Four principles of Object Oriented Programming are

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 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.
       * Hides 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 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.

No comments

Powered by Blogger.