what is polymorphism with example?types of polymorphism?
Answer Posted / sai
Two Types,namely
1)Compile Time Poly(Say as Method Overloading)
Methods having same name but differ in no. of
Parameters,Return type and order of parameters.
2)Runtime Poly(say as Method Overriding and Dynamic Dispatch)
Subclass methods having the same signature as that
of the super class method.
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
How can you avoid serialization in child class if the base class is implementing the serializable interface?
I want to print “hello” even before main is executed. How will you acheive that?
How does enum work in java?
Are the imports checked for validity at compile time? Will the code containing an import such as java.lang.abcd compile?
How do you break a loop?
How do you declare an array that will hold more than 64KB of data?
Is it possible to specify multiple jndi names when deploying an ejb?
Explain the significance of listiterator.
Which programming language is best in future?
Why we go for collections in java?
What is the file extension for java?
What are the restrictions that are applied to the java static methods?
Why main function is static?
What is the difference between a switch statement and an if statement?
Why java does not support pointers?