An Introduction To Object Oriented Programming ( OOPs ) :

Object-oriented programming (oops) is a style of programming characterized by the identification of classes of objects closely linked with the methods (functions) with which they are associated. It also includes ideas of inheritance of attributes and methods.

 

oops

Here We can see:

class Animal

which means that we made a class name as Animal which contains objects like:

  1. Dog
  2. Cat
  3. Tiger
  4. Beer
Animal Dog = new Animal();

The programming with class and objects is called object oriented programming.

oops

class:

In object-oriented programming , a class is a template definition of the methods and variable s in a particular kind of object . for Example:

green leafed tree
class forest

object:

An object is a collection of properties, and a property is an association between a name (or key) and a value.

close up portrait of lion
object = Animals name

Abstraction:

it is process of hiding implementation details and only showing the functionality to the user.

Inheritance:

When a Base Class Inherit to the derived class that process is called inheritnce.

class Electronics

Derived class:
1. TV extends Electronics
2. Mobile extends Electronics
3. AC extends Electronics

Polymorphism:

when we create a same function in diffferent classes is called polymorphism. for example:

Animal sound();
we create a animal class then we can create sum more classes extends Animal:
Cat:
void sound('meow');

Dog:
void sound('bark');

Lion:
void sound('roar');

Encapsulation:

Encapsulation in Java is a powerful mechanism for storing the data members and data methods of a class together

2 Comments

Leave a Reply

For News Subscribe Us!

Can curiosity may end shameless explained. True high on said mr on come. An do mr design at little myself wholly entire though. Attended of on stronger or mr pleasure.

You have been successfully Subscribed! Ops! Something went wrong, please try again.

© 2022 Code With AM