Basic concepts of Java

Java is an object-oriented programming language so let’s see some concepts about this kind of programming:

  • Abstract: the user will have the information on what the object does instead of how it does it.
  • Encapsulation and data hiding:  t gathers characteristic elements of an entity and hides it from rest.
  • Inheritance: A class that is derived from another class is called a subclass (also a derived class, extended class, or child class). The class from which the subclass is derived is called a superclass (also a base class or a parent class).

This is the parent class:

This is a subclass or child class from Pet:

blank

  • Polymorphism: refers to the property by which it is possible to send syntactically equal messages to objects of different types.