answersLogoWhite

0

What is a polymorphism in java programming?

Updated: 8/19/2019
User Avatar

Wiki User

13y ago

Best Answer

Polymorphism can be considered as the ability of one thing being multiple other things (though partially or fully). Am I confusing you? I believe yes. To put it in simpler words, any java object that can pass more than one Is-A test can be considered polymorphic. Other than objects of type Object, all Java objects are polymorphic in that they pass the IS-A test for their own type and for class Object.

Remember that the only way to access an object is through a reference variable, and there are a few key things to remember about references:

• A reference variable can be of only one type, and once declared, that type can never be changed (although the object it references can change).

• A reference is a variable, so it can be reassigned to other objects, (unless the reference is declared final).

• A reference variable's type determines the methods that can be invoked on the object the variable is referencing.

• A reference variable can refer to any object of the same type as the declared reference, or-this is the big one-it can refer to any subtype of the declared type!

• A reference variable can be declared as a class type or an interface type. If the variable is declared as an interface type, it can reference any object of any class that implements the interface.

User Avatar

Wiki User

13y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is a polymorphism in java programming?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Why is Java called an Object Oriented Programming Language?

Actually java is not purely object oriented.because we can use the primitive data types in Java.In java all those things or considered as classes and objects .So we are called java is an object oriented programming language...


Does java support oops concept?

Yes. Java is an Object Oriented Programming Language and it supports the OOPS concepts like Inheritance, Polymorphism etc


What is Dynamic Polymorphism?

Dynamic polymorphism is a programming method that makes objects with the same name behave differently in different situations. This type of programming is used to allow Java Scripts to run while playing a game on the computer, for example.


Does java supports polymorphism?

Yes.


What is abstraction method in java?

Abstraction in Java or Object oriented programming is a way to segregate implementation from interface and one of the five fundamentals along with Encapsulation, Inheritance, Polymorphism, Class and Object. Abstraction in Java is achieved by using interface and abstract class in Java.


Is Interfaces in Java a kind of polymorphism?

No. Interfaces in Java are a construct to get polymorphism ( subtype polymorphism ) working in Java, but they are not a "kind" of polymorphism. In polymorphism happens when two objects respond to the same message ( method call ) in different way ( hence poly -> many, morphism -> way or shape : polymorphism -> many ways). In Java to be able to send the same message to two different objects you have to either inherit the same parent, or implement the same interface.


How oops concept is implemented in java?

OOP stands for Object Oriented Programming. Everything in Java is an Object. Any class you create extends the Object class by default thereby making everything in Java an object. Moreover, you can use features like Inheritance, Polymorphism, Encapsulation etc which are OOP concepts thereby making Java an Object Oriented Programming Language


Some important features of java programming?

The important features of Java are the ones that relate to the object oriented concepts like: a. Inheritance b. Polymorphism c. Encapsulation d. Data Hiding e. Data Abstraction etc


What programming language are java applets written in?

Java applets are written in the Java programming language. Java is considered to be one of the oldest and most commonly used programming languages in the world.


What is an essential of Object Oriented Programming?

The 3 essential concepts of Object Oriented Programming are:InheritanceEncapsulation &Polymorphism


What is the first name before of the Java Programming?

The first name of the Java Programming was Oak. It then went by the game Green and finally Java from Java coffee.


In what study would one find polymorphism?

Polymorphism is the changing of one subject to an altered state. There are actually two areas of study where polymorphism would be particularly common: chemistry and web programming.