Sunday, June 2, 2013


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).
Polimorphysm: the ability of an object to take on many forms. In programming languages polymorphism is the capability of an action or method to do different things based on the object that it is acting upon. This is the third basic principle of object oriented programming. The three types of polymorphism are: ad-hoc (overloading and overriding), parametric (generics) and dynamic method binding.
Extends : is used to carry out the reduction of a class.
Abstraction: Abstraction refers to the ability to make a class abstract in OOP. An abstract class is one that cannot be instantiated. All other functionality of the class still exists, and its fields, methods, and constructors are all accessed in the same manner. You just cannot create an instance of the abstract class.
Method Overloading: a function means that you have multiple functions with the same name, but different signatures. The signature of a function is its return type and number/types of parameters.
Method Overriding: a method in the child class having the same name, same number of parameters and the same access specifier as in it’s parent then we can say that we are doing method overriding.
  • The example of Polimorphsm :    Bird myBird = null;
                                                                                    myBird = new Bird (7);
                                                                                    System.out.println ("");
  • The example in constractor :     public Bird (int v)
                                                                                                    super ();
                                                                                                    this.flyVelocity = v;
                                                          System.out.println("This Bird flyVelocity is " +flyVelocity);