answersLogoWhite

0

In a sense, yes, but polymorphism usually refers to an objects ability to have different behaviors than that of it's parent class.

Using an interface among multiple classes ensures that all subclasses have to implement those methods, and thus the objects could be stored in an instance of the superclass to allow for dynamic programming.

User Avatar

Wiki User

14y ago

What else can I help you with?

Related Questions

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.


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.


Does java supports polymorphism?

Yes.


What kind of constructs can be declared in a Java interface?

Constants and abstract methods. That's it.


Can you define variables in interface in java?

yes we can define a variable in an interface in java.


Can you create a constructor for an interface in java?

NO, we cannot create a contructor for an interface in java.


What kind of drugs commonly has polymorphism?

Polymorphism is common with barbiturates, steroids, and sulphonamides.


What is intrface in java?

interface is a list of methods which implements that interface


What is polymorphism and its types?

Polymorphism means multiple form of a function, variable or object. In Computer Science, polymorphism is a programming language feature that allows values of different data types to be handles using a common interface. There are three types : Ad-Hoc Polymosphism, Parametric Polymorphism, Subtype/Inclusion Polymorphism. Source: Wikipedia.


What is a tagging interface type?

A tagging interface type in Java is an interface that has not defined methods such as the java.io.Serializable interface.


What java interface must be implemented by all threads?

Runnable interface


Does java support oops concept?

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

Trending Questions
What is being measured by voltage? Which nation is a world leader in desalination projects? What kva generator delivers 500 amps? How do you implement c program for conditional compilation? Cell phones washing machines and door knobs are examples of which human accomplishment? Where can you find design spec for electromagnetic piston engines? What is difference between the metric system and the imperial unit? What is the difference between overriding overloading and shadowing as well as hiding while using inheritance? How do you write an if-else statement that increments the value of count by 1 if the value of total is evenly divisible by four or five and increments the value of count by 2 otherwise? Select the ePolicy Orchestrator component that provides the UI of the System tree sorting of nodes tags and policies? How do you couple DC motor to alternator? Can Paper can be recycled an infinite number of times without losing its strength? The IEE standared 32 bit floating point representation of the binary number 19.5 is? What is the difference between the structure tag and structure variable? Can a cracked non leaky concrete basement foundation wall be repaired from inside the basement and if so with what kind of materials? DMM test lead resistance should never excced? What steps do schools go through to change their uniform? Why do natural gas lines have to break ground before entering a building? What of these writings relies mostly on logic? Which invention helped fuel the Renaissance Era?