Home TechnologyProgrammingJava Subscribe to RSS

What Is A Polymorphism In Java?

Answer Question

2 Answers - Sort by: Date | Rating

    Polymorphism is a feature in Java that allows us to create a variable in the superclass so that we can reference an object in the subclass. This way, we can make it possible to use the variable whose value we don't know until at a certain stage in the program. Normally, a value is assigned to this variable only when certain conditions are fulfilled, hence at runtime (late binding).
    It is a feature of Object Oriented Programming that allows methods to do different things based on the objects they are acting upon.
    Inheritance (using properties of one class while adding own functionality in another class) uses the keyword 'extends' and works together with polymorphism to achieve the desired results.
    Hope this helps :-)
    0 0

    Jamesy 

    answered 7 months ago

      In Java like programming language, Polymorphism allows values of different data types to be handled using a uniform interface. Actually The concept of parametric polymorphism applies to both data types and functions.
      So we can say: A function that can evaluate to or be applied to values of different types is known as a polymorphic function.
      0 0

      Alon_nad 

      answered 4 months ago

        Answer Question - Answers are editable for 5 min.

        If you do not Sign-in or Register your answers will be anonymous,

        your answers may also be checked before going online.

        More

        More

           
           

          Ask a Question via Twitter

          Send a question to @askblurtit and we will publish it online and send you a reply everytime you receive an answer.

          Blurtit Store

          Get T-shirts, hoodies, caps and more at the Blurtit store

          Blurtit International