Learn with best explanation

Coding tutorials and solutions

Object Oriented Programming Tutorial

Here you will learn about Object Oriented Programming, basic and advanced topics of oop, inheritance, polymorphism, abstraction, static, dynamic binding and other advanced concepts in depth.

Object Oriented Programming Concept (OOP) in Java

Object Oriented is methodology or paradigm to write a manageable code. OOP concept is based on real world entities. It makes code easy to read and write, maintainable and reusable. By using Object oriented pattern software development becomes easy. Following are the core concepts of OOP.

  1. Class
  2. Object
  3. Inheritance
  4. Polymorphism
  5. Abstraction
  6. Encapsulation

There are some other concepts which are used in OOP design pattern.oop object oriented programming concept by javakar

Java Class in Object Oriented Programming

Class is the important element of Java program. Every program has at least one class. A class in Java is blueprint or internal structure of an object.

Java Object in Object Oriented Programming

Everything that exist on earth is an object. In programming Object is an instance of class that models real world object. An Object always has some properties or behavior

Difference Between Class and Object

A class is blueprint in which behavior and properties of an object are defined. It is technical representation whereas an object is entity or an instance of class that contains some properties and behave in some way. Example: Dog falls in category of animal then animal is class which contains all behaviors and properties of all animals and Dog it self is an object of animal which has been provided behaviors and properties similar to all animals of the world. All animals sleep and eat hence actions is defined ad behavior and color, size and weight which are not actions are defined properties.

Java Inheritance in Object Oriented Programming

Inheritance is like inherit the same properties from generation to generation in the real world and in programming its sharing properties and behavior from one class to an other class. 

Java Polymorphism in Object Oriented Programming

Poly means many and morphism denotes forms hence polymorphism means many forms. Polymorphism is technique to do a job in different ways. We use method overloading and method overriding to achieve polymorphism in Java.

Java Abstraction in Object Oriented Programming

Abstraction is used to hide internal details and show only functionality. For example car break we just break the car and car stops and don't know it's internal working.

Java Encapsulation in Object Oriented Programming

Encapsulation means wrapping the properties and methods in single unit. Example capsule itself is wrapped with different medicines.

Advantages of Object Oriented Programming

OOP methodology makes development and maintenance of software easier, whereas, in procedure-oriented programming, it is not easy to manage if code grows as project size increases. It provides data hiding and in in procedure-oriented programming there is global data that is accessible from anywhere. OOP provides the ability to simulate real-world event much more effectively by the help of which we can provide the solution of real world problem if we use Object-Oriented Programming language.