Explain the concept of polymorphism with examples?
Answers were Sorted based on User's Feedback
Answer / dhawal
polymorphisum-polymorphisum means one name many
forms,basically polymorphisum is base class pointer which
can access derive class members
real time example:-
on street signal if red signal turn on all type of vehicals
are stops means on single action multiple tasks are done.
compile time polymorphisum-overloading.
run time polymorphisum-overriding.
| Is This Answer Correct ? | 16 Yes | 0 No |
Answer / venkat
Polymorphism means If one thing exists in different forms v
can it as pOlymorphism
EX:Overloading
Overriding
| Is This Answer Correct ? | 14 Yes | 7 No |
Answer / ravikiran(aptech mumbai)
polymorphism is utilizing the same interface for multiple
purposes
ex:-overloading,overriding
| Is This Answer Correct ? | 7 Yes | 2 No |
Answer / nazim virani
Polymorphism is accomplished when different component or
classes behave differently on same interface
| Is This Answer Correct ? | 3 Yes | 1 No |
Answer / sankar
polymorphism helps us create classes which are simple and
user friendly.it allow the class to behave polymorphicly
when different inputs are passed on to it.
| Is This Answer Correct ? | 6 Yes | 5 No |
Answer / babul mog
Polymorphism: polymorphism means the same interface for multiple purposes,basically it is base class pointer which can access derive class members.
It has two types:
1. compile time polymorphisum: function overloading,function overriding.
2. runtime polymorphism : virtual function.
| Is This Answer Correct ? | 2 Yes | 1 No |
How to invoke external process in java.
What is use of super keyword?
Why do we use string?
There are 2 different ways to create an object. a)By using keyword "new" b)By using Class.forName ("className").newInstance(); What is the difference between these 2 methods.
In Java why we write public static void main(String args[]) why not main()?
46 Answers Aptech, GE Healthcare, Infosys, Microsoft, New Horizon, Practical Viva Questions, TCS, Wipro,
What methods are used to get and set the text label displayed by a button object?
What is the purpose of the System class?
perpare on factorypattern,linklist wothout using collection, (multitharding ie create producer/customer therad producer create Queue continuesly,consumer consume queue, consumer wait if queue is full,producer wait if queue is empty),diff betn sleep(1000)&wait(1000) these r the main Q ask in huawei(2008)
State the difference between creating string as new () and literal.
How many bits is a double?
What is parsing a sentence?
Which sorting is used in arrays sort in java?