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 :-)
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
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.
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
- Are Current Java-oriented Mutation Testing Tools Adequate? And If Not, What Do They Require To Become Adequate? You Should Address This Question From Both A Test Case Evaluation And An Improving TDD Viewpoint.
- Which Act Had The Highest Number Of Christmas Number Ones?
- How To Create A Java Program That Accepts A Number And Examines If It Is Odd Or Even And Positive Or Negative?
- How To Create A Java Program That Accepts 3 Numbers?
- Can You Create A Java Program That Accepts 3 Numbers (num1, Num2, Num3) And Sort Them In Ascending And Descending Order?
- What Is The Un Theme Of The Year 2009?
- Write A Program To Display A String With An Embedded Quote:"Sachin Has Played A Game Of His Life"?
- Why Java Is Popular In Market?
- How Can I Use Dmp File In Java?
- Can You Write A Program Called InheritanceTest.java To Support An Inheritance Hierarchy For Class Point–Square–Cube?
- A Java Program To Get Sports Marks In Student Package And Print Total Marks Of Student?
- The Project Aims To Implement A JAVA Parser? 1- Classes And Functions 2- Arithmetic/logic Expressions 3- If Statement
- How To Get Java On My Lg 260?
- Write A Java Program To Store A Number Find If It Is Positive Or A Negative Number If Positive Print I Am The First?
- How To Update The Sim 3 Expansion?
- What Is An Attribute In Java?
- Do I Have To Write A Main Method In Every Class I Create?
- What How The Step For Make Library Management?
- In Which Process We Can Start Java?
- Define The Concept Of Java Byte Code?
- How To Run Remote Method Invocation In More Machine?
- How To Run Java Remote Method Invocation In More Machine?
- How To Make A Java Program That Will Ask The User To Input A Number And Display All The Even Number And The Sum Of All Even Numbers Based On The Inputted/ Given Numbers?
- Is A Static Variable An Instance?
- What Does Literati-on Mean?
- What Is The Use Of Overloading In Polymorphism?
- What Is The Meannings Of Polymorphism?
- What Is Interface Polymorphism And Inheritance Polymorphism?
- What Is Compile/runtime Polymorphism?
- What Is Polymorphism And Virtual Functions In .NET Framework?
- Is Adaptation Of An OOP Concept Polymorphism To Structural Languages Is Possible?

New Comment - Comments are editable for 5 min.