Print This Article Post Comment Add To Favorites Email to Friends Ezine Ready

In Java What Is The Benefits Of Polymorphism Concept

By: Infocampus Home | Computers-and-Technology


About Polymorphism:

Polymorphism contains two words : Poly and Morphism . Poly means many and morphism means behaviour.The ability of an object to take on different forms is known as polymorphism. Polymorphism is the capability of a method to do different things based on the object that it is acting upon.

Polymorphism is a programming language feature that allows values of different data types to be handled using a uniform interface.We can see the most common use of polymorphism in OOP so, when a parent class reference is used to refer to java training center bangalore a child class object.

Any Java object that can pass more than one IS-A test is considered to be polymorphic. In Java,
all Java objects are polymorphic since any object will pass the IS-A test for their own type and
for the class Object.

We know that only possible way to access an object is through a reference variable. A reference
variable can be of only one type. Once declared, the type of a reference variable cannot be changed.

The reference variable can be reassigned to other java course in bangalore objects provided that it is not declared final. The type of the reference variable would determine the methods that it can call on the object.
We create the reference variable for class as well as for interface.

Polymorphism exists in three distinct forms in Java:
Method overloading
Method overriding through inheritance
Method overriding through the Java interface
Types of Polymorphism:
[1]Compile Time Polymorphism
[2]Run Time Polymorphism
Compile Time Polymorphism: When method binding happens at compile time is known as compile time polymorphism or static binding.Method binding means when method call get attach with method body.
For achieving Static binding java/j2ee classes bangalore Method Overloading is necessary.
Note: Method Overloading means same method name but differs in number of parameters ,types of parameters and position of parameters.
Run Time Polymorphism : When method binding happens at run time is known as run time polymorphism or dynamic binding.For getting dynamic binding inheritance,overriding and upcasting is necessary.
If any one property not there we can’t get the run time polymorphism.
Types of Polymorphism:
[1]Compile Time Polymorphism
[2]Run Time Polymorphism

Difference between Compile Time and Run Time Polymorphism
1)During compile time source code changes into executable code .but during run time executable code is used to give output.
2)Error present during compile time could be compiled Advanced java training in bangalore without error,only syntax of code has to be correct.
But if logic of code is not correct then it will be compiled successfully but gives error during runtime.
3)Error during compile time is due to syntax error but error during runtime is due to logical error.
Need Of Polymorphism :
1) The basic reason behind polymorphism is that we can implement different behaviours of the same object depending upon the reference type passed to an object.
2) jdbc,servlets,jsp have come through polymorphism,if not there we have to remember all dependent classes related to DB,Servers...to use in our java coding
3) Polymorphism enables us to best core java training in bangalore define one or more methods to have the same name but differs in number of parameters and method types.
If we do not have polymorphism in Java then we cannot overload methods.

This is the short description about the polymorphism in java . To get the job as java developer easily join Infocampus Software Training Institute for java training center bangalore.




Article Source: http://www.eArticlesOnline.com

About the Author:
Infocampus is a java training center in bangalore with the 100% placement assistance and provides real time project.Attend 4 days free demo classes on java course in bangalore . Complete practical session is available for best core java training in bangalore. Training is given by the 10+ years trainers. For the Advanced Java Training pay fees in installaments. Mock test and mock interviews are conducted every weekend for java/j2ee classes. Java Classes are available on flexible timing on weekdays and weekends.
To get the free demo classes on java training call at : 9738001024 or to know about the syllabus of java visit at : http://www.infocampus.co.in/java-training-bangalore.html

Tags: , , , ,

Please Rate this Article

 

Not yet Rated

Click the XML Icon Above to Receive Computers-and-Technology Articles Via RSS!

Recent Related Articles From Computers-and-Technology

  • Hibernate A Framework For Mapping In Java
    By: Infocampus | Apr 28th 2017
    Hibernate is an object-relational mapping (ORM) library for Java language, providing a framework for mapping an object-oriented domain model to a traditional relational database. Read

  • Software Development Services
    By: abigaylemark1 | Apr 27th 2017
    Companies, professional and individuals often require custom software applications to run their operations smoothly. Some are reticent to hiring a team of professionals for the task, thinking they don’t need it so much, but there are many benefits that come from personalized software development. It all depends on the com ... Read

  • Why Invest In Modded Controllers Xbox One
    By: abigaylemark1 | Apr 27th 2017
    If you are used to playing online games and not using anything that might help you become better at it, you should know that you have been missing out on a long list of advantages that are usually associated with modded controllers xbox one. The same goes if you check out modded controllers ps4 and do not really know whethe ... Read

  • Where Can You Find Mod Controllers Ps4?
    By: abigaylemark1 | Apr 27th 2017
    Even though you might believe that you can come across mod controllers xbox one in gaming stores that can be found in your area, you should know that this would be impossible seeing as these products are usually hard to get by. At the same time, you might want to know that mod controllers ps4 that actually work and offer yo ... Read

  • Which Smartphone For Which Purpose?
    By: Antoine | Apr 27th 2017
    Nowadays there are many Smartphone brands and more than a thousand of different mobile are available on the market. In this universe of electronic devices, it is easy to get lost when you want to buy a Smartphone. Which one is the best for you? What kind of phone should you choose which is the most adapted to your need and ... Read

  • How Does The Digital Egt Gauge Actually Works?
    By: Joseph Polizzotto | Apr 27th 2017
    EGT gauges are found in specific autos and planes. By observing EGT, the driver or pilot can get a thought of the vehicle's air-fuel proportion. Read

  • In Java How Collection Is Single Unit Of Objects
    By: Infocampus | Apr 26th 2017
    A collections framework is a unified architecture for representing
    and manipulating collections. Collection represents a single unit of objects i.e. a group.
    Read

  • Packages A Mechanism Which Makes The Code Easy In Java
    By: Infocampus | Apr 25th 2017
    A java packages is a collection of comparative sorts of classes, interfaces and sub-packages. Packages in java can be arranged in two forms: built-in packages and user defined packages. Read

  • Gmail Help & Support Gmail Technical Support Number: 1-888-996-3777
    By: JASTINE | Apr 24th 2017
    gmail password Forget
    How To Reset Gmail Password
    Gmail Hijacked
    How To Set up a Gmail Account in cell phone
    How To Set up a Gmail On IPhone
    How To Restore Gmail Contacts
    How To Change Gmail Password
    How To Recover Gmail Password
    Forget Gmail Recovery Option
    Gmail Troubl ...
    Read

  • Exception Handling A Concept To Avoid The Program Terminate Improperly In Java
    By: Infocampus | Apr 22nd 2017
    When java executing any faulty statement , an interruption occur or program terminated improperly .that is known as exception.We need to handle the exception using exception handling mechanism. Read


Copyright © 2005-2015 eArticlesOnline, LLC - All Rights Reserved
Terms of Service | Privacy Policy